mirror of https://github.com/thesofproject/sof.git
trace: rename trace_flush() to trace_flush_dma_to_mbox()
Pure rename, zero functional change.
The very poorly named trace_flush() function sounds like earlier
scheduling of something that would the same later anyway but that's
absolutely not what it does. Instead it copies pending DMA traces to the
shared mailbox.
As an example, in June 2020, PR #3195 commit 6c14e76c0d
("trace: Log
FW ABI and hash numbers") added a tr_info() "banner" immediately after
to make sure tracing works. That included a likely misunderstood
trace_flush() call immediately after the tr_info().
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This commit is contained in:
parent
ff69d28210
commit
29b1a9fc92
|
@ -81,9 +81,8 @@ void panic_dump(uint32_t p, struct sof_ipc_panic_info *panic_info,
|
|||
count = MAILBOX_EXCEPTION_SIZE -
|
||||
(size_t)(ext_offset - (char *)mailbox_get_exception_base());
|
||||
|
||||
/* flush last trace messages */
|
||||
#if CONFIG_TRACE
|
||||
trace_flush();
|
||||
trace_flush_dma_to_mbox();
|
||||
#endif
|
||||
|
||||
/* dump stack frames */
|
||||
|
|
|
@ -52,7 +52,7 @@ int dma_trace_host_buffer(struct dma_trace_data *d,
|
|||
struct dma_sg_elem_array *elem_array,
|
||||
uint32_t host_size);
|
||||
int dma_trace_enable(struct dma_trace_data *d);
|
||||
void dma_trace_flush(void *t);
|
||||
void dma_trace_flush(void *destination);
|
||||
void dma_trace_on(void);
|
||||
void dma_trace_off(void);
|
||||
|
||||
|
|
|
@ -137,7 +137,7 @@ struct trace_filter {
|
|||
ctx, id_1, id_2, \
|
||||
format, ##__VA_ARGS__)
|
||||
|
||||
void trace_flush(void);
|
||||
void trace_flush_dma_to_mbox(void);
|
||||
void trace_on(void);
|
||||
void trace_off(void);
|
||||
void trace_init(struct sof *sof);
|
||||
|
@ -253,7 +253,7 @@ do { \
|
|||
|
||||
#define trace_point(x) do {} while (0)
|
||||
|
||||
static inline void trace_flush(void) { }
|
||||
static inline void trace_flush_dma_to_mbox(void) { }
|
||||
static inline void trace_on(void) { }
|
||||
static inline void trace_off(void) { }
|
||||
static inline void trace_init(struct sof *sof) { }
|
||||
|
|
|
@ -463,7 +463,7 @@ int trace_filter_update(const struct trace_filter *filter)
|
|||
}
|
||||
|
||||
/** Sends all pending DMA messages to mailbox (for emergencies) */
|
||||
void trace_flush(void)
|
||||
void trace_flush_dma_to_mbox(void)
|
||||
{
|
||||
struct trace *trace = trace_get();
|
||||
volatile uint64_t *t;
|
||||
|
|
|
@ -111,7 +111,7 @@ void WEAK trace_log_filtered(bool send_atomic, const void *log_entry, const stru
|
|||
(void) arg_count;
|
||||
}
|
||||
|
||||
void WEAK trace_flush(void)
|
||||
void WEAK trace_flush_dma_to_mbox(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue