tracing: Add TRACE_CUSTOM_EVENT() macro
authorSteven Rostedt (Google) <rostedt@goodmis.org>
Thu, 3 Mar 2022 22:05:34 +0000 (17:05 -0500)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Fri, 11 Mar 2022 16:49:24 +0000 (11:49 -0500)
commit3a73333fb370f7b65de9d94c53df503642bda789
treec3bafc1a059c00507daabd3ba27ea4c3c3a92bd9
parentaf6b9668e85ffd1502aada8036ccbf4dbd481708
tracing: Add TRACE_CUSTOM_EVENT() macro

To make it really easy to add custom events from modules, add a
TRACE_CUSTOM_EVENT() macro that acts just like the TRACE_EVENT() macro,
but creates a custom event to an already existing tracepoint.

The trace_custom_sched.[ch] has been updated to use this new macro to show
how simple it is.

Link: https://lkml.kernel.org/r/20220303220625.738622494@goodmis.org
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Joel Fernandes <joel@joelfernandes.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Tom Zanussi <zanussi@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
include/linux/trace_events.h
include/trace/define_custom_trace.h [new file with mode: 0644]
include/trace/trace_custom_events.h [new file with mode: 0644]
samples/trace_events/Makefile
samples/trace_events/trace_custom_sched.c
samples/trace_events/trace_custom_sched.h [new file with mode: 0644]