|
Sound Open Firmware
|


Go to the source code of this file.
Data Structures | |
| struct | trace_filter |
Macros | |
| #define | _DECLARE_LOG_ENTRY(lvl, format, comp_class, n_params) |
| The start of this linker output MUST match the 'ldc_entry_header' struct defined in the logger program running in user space. | |
| #define | _TRACE_EVENT_MAX_ARGUMENT_COUNT 4 |
| #define | trace_event_with_ids(class, ctx, id_1, id_2, format, ...) |
| #define | trace_event_atomic_with_ids(class, ctx, id_1, id_2, format, ...) |
| #define | trace_warn_with_ids(class, ctx, id_1, id_2, format, ...) |
| #define | trace_warn_atomic_with_ids(class, ctx, id_1, id_2, format, ...) |
| #define | _trace_event_with_ids(lvl, class, ctx, id_1, id_2, format, ...) |
| #define | _trace_event_atomic_with_ids(lvl, class, ctx, id_1, id_2, format, ...) |
| #define | MTRACE_DUPLICATION_LEVEL LOG_LEVEL_ERROR |
| #define | trace_point(x) |
| #define | BASE_LOG_ASSERT_FAIL_MSG |
| #define | CT_ASSERT(COND, MESSAGE) |
| #define | trace_check_size_uint32(a) |
| #define | STATIC_ASSERT_ARG_SIZE(...) |
| #define | _log_message(log_func, atomic, lvl, comp_class, ctx, id_1, id_2, format, ...) |
| _log_message is where the memory-saving dictionary magic described above happens: the "format" string argument is moved to a special linker section and replaced by a &log_entry pointer to it. | |
| #define | _log_nodict(atomic, n_args, lvl, format, ...) |
| #define | tracev_event_with_ids(class, ctx, id_1, id_2, format, ...) |
| #define | tracev_event_atomic_with_ids(class, ctx, id_1, id_2, format, ...) |
| #define | trace_error_with_ids(...) |
| #define | trace_error_atomic_with_ids(...) |
| #define | trace_dev_err(get_ctx_m, get_id_m, get_subid_m, dev, fmt, ...) |
| Trace from a device on err level. | |
| #define | trace_dev_warn(get_ctx_m, get_id_m, get_subid_m, dev, fmt, ...) |
| Trace from a device on warning level. | |
| #define | trace_dev_info(get_ctx_m, get_id_m, get_subid_m, dev, fmt, ...) |
| Trace from a device on info level. | |
| #define | trace_dev_dbg(get_ctx_m, get_id_m, get_subid_m, dev, fmt, ...) |
| Trace from a device on dbg level. | |
| #define | tr_err_atomic(ctx, fmt, ...) |
| #define | tr_warn_atomic(ctx, fmt, ...) |
| #define | tr_info_atomic(ctx, fmt, ...) |
| #define | tr_dbg_atomic(ctx, fmt, ...) |
| #define | tr_err(ctx, fmt, ...) |
| #define | tr_warn(ctx, fmt, ...) |
| #define | tr_info(ctx, fmt, ...) |
| #define | tr_dbg(ctx, fmt, ...) |
| #define | mtrace_printf(log_level, format_str, ...) |
| Direct, low-level access to mbox / shared memory logging when DMA tracing is either not initialized yet or disabled or found broken for any reason. | |
Typedefs | |
| typedef void(* | log_func_t) (bool send_atomic, const void *log_entry, const struct tr_ctx *ctx, uint32_t lvl, uint32_t id_1, uint32_t id_2, int arg_count, va_list args) |
Functions | |
| static struct trace * | trace_get (void) |
| void | trace_flush_dma_to_mbox (void) |
| void | trace_on (void) |
| void | trace_off (void) |
| void | trace_init (struct sof *sof) |
| void | trace_log_filtered (bool send_atomic, const void *log_entry, const struct tr_ctx *ctx, uint32_t lvl, uint32_t id_1, uint32_t id_2, int arg_count, va_list args) |
| void | trace_log_unfiltered (bool send_atomic, const void *log_entry, const struct tr_ctx *ctx, uint32_t lvl, uint32_t id_1, uint32_t id_2, int arg_count, va_list args) |
| struct sof_ipc_trace_filter_elem * | trace_filter_fill (struct sof_ipc_trace_filter_elem *elem, struct sof_ipc_trace_filter_elem *end, struct trace_filter *filter) |
| int | trace_filter_update (const struct trace_filter *elem) |
| void | mtrace_dict_entry (bool atomic_context, uint32_t log_entry_pointer, int n_args,...) |
| Appends one SOF dictionary entry and log statement to the ring buffer implementing the 'etrace' in shared memory. | |
| void | mtrace_event (const char *complete_packet, uint32_t length) |
| Posts a fully prepared log header + log entry. | |
| void | _log_sofdict (log_func_t sofdict_logf, bool atomic, const void *log_entry, const struct tr_ctx *ctx, const uint32_t lvl, uint32_t id_1, uint32_t id_2, int arg_count,...) |
| #define _DECLARE_LOG_ENTRY | ( | lvl, | |
| format, | |||
| comp_class, | |||
| n_params ) |
The start of this linker output MUST match the 'ldc_entry_header' struct defined in the logger program running in user space.
| #define _log_message | ( | log_func, | |
| atomic, | |||
| lvl, | |||
| comp_class, | |||
| ctx, | |||
| id_1, | |||
| id_2, | |||
| format, | |||
| ... ) |
_log_message is where the memory-saving dictionary magic described above happens: the "format" string argument is moved to a special linker section and replaced by a &log_entry pointer to it.
This must be a macro for the source location to be meaningful.
| #define _log_nodict | ( | atomic, | |
| n_args, | |||
| lvl, | |||
| format, | |||
| ... ) |
| #define _trace_event_atomic_with_ids | ( | lvl, | |
| class, | |||
| ctx, | |||
| id_1, | |||
| id_2, | |||
| format, | |||
| ... ) |
| #define _TRACE_EVENT_MAX_ARGUMENT_COUNT 4 |
| #define _trace_event_with_ids | ( | lvl, | |
| class, | |||
| ctx, | |||
| id_1, | |||
| id_2, | |||
| format, | |||
| ... ) |
| #define BASE_LOG_ASSERT_FAIL_MSG |
| #define CT_ASSERT | ( | COND, | |
| MESSAGE ) |
| #define MTRACE_DUPLICATION_LEVEL LOG_LEVEL_ERROR |
| #define mtrace_printf | ( | log_level, | |
| format_str, | |||
| ... ) |
Direct, low-level access to mbox / shared memory logging when DMA tracing is either not initialized yet or disabled or found broken for any reason.
To keep it simpler than and with minimal dependencies on the huge number of lines above, this does not check arguments at compile time. There is neither log level filtering, throttling or any other advanced feature.
| #define STATIC_ASSERT_ARG_SIZE | ( | ... | ) |
| #define tr_dbg | ( | ctx, | |
| fmt, | |||
| ... ) |
| #define tr_dbg_atomic | ( | ctx, | |
| fmt, | |||
| ... ) |
| #define tr_err | ( | ctx, | |
| fmt, | |||
| ... ) |
| #define tr_err_atomic | ( | ctx, | |
| fmt, | |||
| ... ) |
| #define tr_info | ( | ctx, | |
| fmt, | |||
| ... ) |
| #define tr_info_atomic | ( | ctx, | |
| fmt, | |||
| ... ) |
| #define tr_warn | ( | ctx, | |
| fmt, | |||
| ... ) |
| #define tr_warn_atomic | ( | ctx, | |
| fmt, | |||
| ... ) |
| #define trace_check_size_uint32 | ( | a | ) |
| #define trace_dev_dbg | ( | get_ctx_m, | |
| get_id_m, | |||
| get_subid_m, | |||
| dev, | |||
| fmt, | |||
| ... ) |
Trace from a device on dbg level.
| #define trace_dev_err | ( | get_ctx_m, | |
| get_id_m, | |||
| get_subid_m, | |||
| dev, | |||
| fmt, | |||
| ... ) |
Trace from a device on err level.
| get_ctx_m | Macro that can retrieve trace context from dev |
| get_id_m | Macro that can retrieve device's id0 from the dev |
| get_subid_m | Macro that can retrieve device's id1 from the dev |
| dev | Device |
| fmt | Format followed by parameters |
| ... | Parameters |
| #define trace_dev_info | ( | get_ctx_m, | |
| get_id_m, | |||
| get_subid_m, | |||
| dev, | |||
| fmt, | |||
| ... ) |
Trace from a device on info level.
| #define trace_dev_warn | ( | get_ctx_m, | |
| get_id_m, | |||
| get_subid_m, | |||
| dev, | |||
| fmt, | |||
| ... ) |
Trace from a device on warning level.
| #define trace_error_atomic_with_ids | ( | ... | ) |
| #define trace_error_with_ids | ( | ... | ) |
| #define trace_event_atomic_with_ids | ( | class, | |
| ctx, | |||
| id_1, | |||
| id_2, | |||
| format, | |||
| ... ) |
| #define trace_event_with_ids | ( | class, | |
| ctx, | |||
| id_1, | |||
| id_2, | |||
| format, | |||
| ... ) |
| #define trace_point | ( | x | ) |
| #define trace_warn_atomic_with_ids | ( | class, | |
| ctx, | |||
| id_1, | |||
| id_2, | |||
| format, | |||
| ... ) |
| #define trace_warn_with_ids | ( | class, | |
| ctx, | |||
| id_1, | |||
| id_2, | |||
| format, | |||
| ... ) |
| #define tracev_event_atomic_with_ids | ( | class, | |
| ctx, | |||
| id_1, | |||
| id_2, | |||
| format, | |||
| ... ) |
| #define tracev_event_with_ids | ( | class, | |
| ctx, | |||
| id_1, | |||
| id_2, | |||
| format, | |||
| ... ) |
| typedef void(* log_func_t) (bool send_atomic, const void *log_entry, const struct tr_ctx *ctx, uint32_t lvl, uint32_t id_1, uint32_t id_2, int arg_count, va_list args) |
| void _log_sofdict | ( | log_func_t | sofdict_logf, |
| bool | atomic, | ||
| const void * | log_entry, | ||
| const struct tr_ctx * | ctx, | ||
| const uint32_t | lvl, | ||
| uint32_t | id_1, | ||
| uint32_t | id_2, | ||
| int | arg_count, | ||
| ... ) |
| void mtrace_dict_entry | ( | bool | atomic_context, |
| uint32_t | log_entry_pointer, | ||
| int | n_args, | ||
| ... ) |
Appends one SOF dictionary entry and log statement to the ring buffer implementing the 'etrace' in shared memory.
| atomic_context | Take the trace->lock if false. |
| log_entry_pointer | dictionary index produced by the _DECLARE_LOG_ENTRY macro. |
| n_args | number of va_args |
| void mtrace_event | ( | const char * | complete_packet, |
| uint32_t | length ) |
Posts a fully prepared log header + log entry.
| struct sof_ipc_trace_filter_elem * trace_filter_fill | ( | struct sof_ipc_trace_filter_elem * | elem, |
| struct sof_ipc_trace_filter_elem * | end, | ||
| struct trace_filter * | filter ) |
| int trace_filter_update | ( | const struct trace_filter * | elem | ) |
| void trace_flush_dma_to_mbox | ( | void | ) |
|
inlinestatic |
| void trace_init | ( | struct sof * | sof | ) |
| void trace_log_filtered | ( | bool | send_atomic, |
| const void * | log_entry, | ||
| const struct tr_ctx * | ctx, | ||
| uint32_t | lvl, | ||
| uint32_t | id_1, | ||
| uint32_t | id_2, | ||
| int | arg_count, | ||
| va_list | args ) |
| void trace_log_unfiltered | ( | bool | send_atomic, |
| const void * | log_entry, | ||
| const struct tr_ctx * | ctx, | ||
| uint32_t | lvl, | ||
| uint32_t | id_1, | ||
| uint32_t | id_2, | ||
| int | arg_count, | ||
| va_list | args ) |
| void trace_off | ( | void | ) |
| void trace_on | ( | void | ) |