tracing: Add synthetic event command generation functions
authorTom Zanussi <zanussi@kernel.org>
Wed, 29 Jan 2020 18:59:25 +0000 (12:59 -0600)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Thu, 30 Jan 2020 14:46:28 +0000 (09:46 -0500)
commit35ca5207c2d111abb9e072f028945d5c12b20836
tree1d6e45f483535d3e844af8e6d165a125de08bd9e
parent86c5426baddae9ff192e3159b9c2e7c14e3964c6
tracing: Add synthetic event command generation functions

Add functions used to generate synthetic event commands, built on top
of the dynevent_cmd interface.

synth_event_gen_cmd_start() is used to create a synthetic event
command using a variable arg list and
synth_event_gen_cmd_array_start() does the same thing but using an
array of field descriptors.  synth_event_add_field(),
synth_event_add_field_str() and synth_event_add_fields() can be used
to add single fields one by one or as a group.  Once all desired
fields are added, synth_event_gen_cmd_end() is used to actually
execute the command and create the event.

synth_event_create() does everything, including creating the event, in
a single call.

Link: http://lkml.kernel.org/r/38fef702fad5ef208009f459552f34a94befd860.1580323897.git.zanussi@kernel.org
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Tom Zanussi <zanussi@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
include/linux/trace_events.h
kernel/trace/trace_events_hist.c