Skip to content

Commit d9dbbdc

Browse files
committed
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 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 thesofproject#9036 Signed-off-by: Marc Herbert <marc.herbert@intel.com>
1 parent e603d8f commit d9dbbdc

1 file changed

Lines changed: 3 additions & 9 deletions

File tree

src/trace/dma-trace.c

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -656,15 +656,9 @@ static void dtrace_add_event(const char *e, uint32_t length)
656656
uint32_t tmp_dropped_entries =
657657
trace_data->dropped_entries;
658658
trace_data->dropped_entries = 0;
659-
/*
660-
* this trace_error invocation causes recursion,
661-
* so after it we have to recalculate margin and
662-
* overflow
663-
*/
664-
tr_err(&dt_tr, "dtrace_add_event(): number of dropped logs = %u",
665-
tmp_dropped_entries);
666-
margin = dtrace_calc_buf_margin(buffer);
667-
overflow = dtrace_calc_buf_overflow(buffer, length);
659+
mtrace_printf(LOG_LEVEL_WARNING,
660+
"dtrace_add_event(): number of dropped logs = %u",
661+
tmp_dropped_entries);
668662
}
669663
}
670664

0 commit comments

Comments
 (0)