Skip to content

Commit

Permalink
dma-trace.c: lower log level of dropped logs and stop recursion
Browse files Browse the repository at this point in the history
Dropping logs is bad but it should not be fatal in itself.

This ERROR is one of the last remaining errors in stable-v2.2, see
thesofproject/sof-test#1075 (comment)

Also switch to the "etrace": drop the dubious recursion and stop using
the DMA trace when it's already saturated.

Disclaimer: this was (successfully) tested only on stable-v2.2, see #9036

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
  • Loading branch information
marc-hb authored and lgirdwood committed Apr 30, 2024
1 parent 18ab8c2 commit bb31696
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/trace/dma-trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -656,15 +656,9 @@ static void dtrace_add_event(const char *e, uint32_t length)
uint32_t tmp_dropped_entries =
trace_data->dropped_entries;
trace_data->dropped_entries = 0;
/*
* this trace_error invocation causes recursion,
* so after it we have to recalculate margin and
* overflow
*/
tr_err(&dt_tr, "dtrace_add_event(): number of dropped logs = %u",
tmp_dropped_entries);
margin = dtrace_calc_buf_margin(buffer);
overflow = dtrace_calc_buf_overflow(buffer, length);
mtrace_printf(LOG_LEVEL_WARNING,
"dtrace_add_event(): number of dropped logs = %u",
tmp_dropped_entries);
}
}

Expand Down

0 comments on commit bb31696

Please sign in to comment.