]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitf227154d952deccfc9d47de935b267c9b11deee9
tree9ef45cfbc62665a529a76b120bf42e40736f2511
parented23f1871db837cf4c7326ad199f363959c02dde
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