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

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

kprobe_event_gen_cmd_start() is used to create a kprobe event command
using a variable arg list, and kretprobe_event_gen_cmd_start() does
the same for kretprobe event commands.  kprobe_event_add_fields() can
be used to add single fields one by one or as a group.  Once all
desired fields are added, kprobe_event_gen_cmd_end() or
kretprobe_event_gen_cmd_end() respectively are used to actually
execute the command and create the event.

Link: http://lkml.kernel.org/r/95cc4696502bb6017f9126f306a45ad19b4cc14f.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_kprobe.c