linux-next/samples/trace_events
Steven Rostedt e52750fb14 tracing: Add __print_dynamic_array() helper
When printing a dynamic array in a trace event, the method is rather ugly.
It has the format of:

  __print_array(__get_dynamic_array(array),
            __get_dynmaic_array_len(array) / el_size, el_size)

Since dynamic arrays are known to the tracing infrastructure, create a
helper macro that does the above for you.

  __print_dynamic_array(array, el_size)

Which would expand to the same output.

Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Avadhut Naik <avadhut.naik@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
Link: https://lore.kernel.org/r/20241022194158.110073-3-avadhut.naik@amd.com
2024-10-30 17:24:32 +01:00
..
Makefile tracing: Add TRACE_CUSTOM_EVENT() macro 2022-03-11 11:49:24 -05:00
trace_custom_sched.c treewide: remove unnecessary <linux/version.h> inclusion 2024-08-12 18:36:44 +09:00
trace_custom_sched.h sched/tracing: Append prev_state to tp args instead 2022-05-12 00:37:11 +02:00
trace-events-sample.c tracing: Add __cpumask to denote a trace event field that is a cpumask_t 2022-11-23 19:08:30 -05:00
trace-events-sample.h tracing: Add __print_dynamic_array() helper 2024-10-30 17:24:32 +01:00