From 4baa64c34e0a36df5192dd59d4d82362fee107bf Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Thu, 11 Apr 2024 20:52:30 +0000 Subject: [PATCH] dma-trace.c: lower log level of dropped logs and stop recursion Dropping logs is bad but it should not be fatal in itself. This ERROR is one of the last remaining one, see https://github.com/thesofproject/sof-test/pull/1075#issuecomment-2049051006 Also switch to the "etrace" and stop using the DMA trace when it's already saturated. Signed-off-by: Marc Herbert --- src/trace/dma-trace.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/trace/dma-trace.c b/src/trace/dma-trace.c index 730d823c837b..1ae9f7add659 100644 --- a/src/trace/dma-trace.c +++ b/src/trace/dma-trace.c @@ -645,15 +645,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); } }