@@ -116,6 +116,7 @@ struct trace_filter {
116116 * image size. This way more elaborate log messages are possible and encouraged,
117117 * for better debugging experience, without worrying about runtime performance.
118118 */
119+
119120/* Map the different trace_xxxx_with_ids(... ) levels to the
120121 * _trace_event_with_ids(level_xxxx, ...) macro shared across log
121122 * levels.
@@ -158,6 +159,20 @@ int trace_filter_update(const struct trace_filter *elem);
158159#define _trace_event_atomic_with_ids (lvl , class , ctx , id_1 , id_2 , format , ...) \
159160 _log_message(trace_log_filtered, true, lvl, class, ctx, id_1, id_2, format, ##__VA_ARGS__)
160161
162+ /**
163+ * Appends one SOF dictionary entry and log statement to the ring buffer
164+ * implementing the 'etrace' in shared memory.
165+ *
166+ * @param atomic_context Take the trace->lock if false.
167+ * @param log_entry_pointer dictionary index produced by the
168+ * _DECLARE_LOG_ENTRY macro.
169+ * @param n_args number of va_args
170+ */
171+ void mtrace_dict_entry (bool atomic_context , uint32_t log_entry_pointer , int n_args , ...);
172+
173+ /** Posts a fully prepared log header + log entry */
174+ void mtrace_event (const char * complete_packet , uint32_t length );
175+
161176/** The start of this linker output MUST match the 'ldc_entry_header'
162177 * struct defined in the logger program running in user space.
163178 */
@@ -431,16 +446,11 @@ struct tr_ctx {
431446 too_many_mtrace_printf_arguments); \
432447 _DECLARE_LOG_ENTRY(log_level, format_str, _TRACE_INV_CLASS, \
433448 META_COUNT_VARAGS_BEFORE_COMPILE(__VA_ARGS__)); \
434- mtrace_dict_entry((uint32_t)&log_entry, \
449+ mtrace_dict_entry(true, (uint32_t)&log_entry, \
435450 META_COUNT_VARAGS_BEFORE_COMPILE(__VA_ARGS__), \
436451 ##__VA_ARGS__); \
437452 } while (0)
438453
439- /** Adds log_header prefix and appends arguments before sending */
440- void mtrace_dict_entry (uint32_t log_entry_pointer , int n_args , ...);
441-
442- /** Posts a fully prepared log header + log entry */
443- void mtrace_event (const char * complete_packet , uint32_t length );
444454
445455#else
446456
0 commit comments