tracing: Add helper functions to simplify event_command.parse() callback handling
authorTom Zanussi <zanussi@kernel.org>
Mon, 10 Jan 2022 14:04:14 +0000 (08:04 -0600)
committerSteven Rostedt <rostedt@goodmis.org>
Mon, 10 Jan 2022 16:09:11 +0000 (11:09 -0500)
commit86599dbe2c5272588f859858239d1f52321eb0f9
tree9ef45cfbc62665a529a76b120bf42e40736f2511
parent2378a2d6b6cf863bdd566aae495336c72bdaec99
tracing: Add helper functions to simplify event_command.parse() callback handling

The event_command.parse() callback is responsible for parsing and
registering triggers.  The existing command implementions for this
callback duplicate a lot of the same code, so to clean up and
consolidate those implementations, introduce a handful of helper
functions for implementors to use.

This also makes it easier for new commands to be implemented and
allows them to focus more on the customizations they provide rather
than obscuring and complicating it with boilerplate code.

Link: https://lkml.kernel.org/r/c1ff71f594d45177706571132bd3119491097221.1641823001.git.zanussi@kernel.org
Signed-off-by: Tom Zanussi <zanussi@kernel.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/trace.h
kernel/trace/trace_events_trigger.c