linux/include/trace
Steven Rostedt 480b9fc4b2 tracing: Add __print_dynamic_array() helper
[ Upstream commit e52750fb14 ]

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
Stable-dep-of: ea8d7647f9 ("tracing: Verify event formats that have "%*p.."")
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-05-02 07:46:49 +02:00
..
events net/ipv4: add tracepoint for icmp_send 2025-03-07 16:56:44 +01:00
misc NFSD: add CB_RECALL_ANY tracepoints 2024-03-06 14:45:17 +00:00
stages tracing: Add __print_dynamic_array() helper 2025-05-02 07:46:49 +02:00
bpf_probe.h tracing: Add __cpumask to denote a trace event field that is a cpumask_t 2025-05-02 07:46:49 +02:00
define_custom_trace.h tracing: Add TRACE_CUSTOM_EVENT() macro 2022-03-11 11:49:24 -05:00
define_trace.h tracepoint: Optimize using static_call() 2020-09-01 09:58:06 +02:00
perf.h tracing: Add __cpumask to denote a trace event field that is a cpumask_t 2025-05-02 07:46:49 +02:00
syscall.h tracepoints: Migrate to use SYSCALL_WORK flag 2020-11-16 21:53:15 +01:00
trace_custom_events.h tracing: Rename the staging files for trace_events 2022-04-02 08:40:04 -04:00
trace_events.h tracing/ftrace: disable preemption in syscall probe 2024-12-14 19:54:45 +01:00