tracing/eprobe: Add eprobe filter support
authorMasami Hiramatsu (Google) <mhiramat@kernel.org>
Mon, 1 Aug 2022 02:32:25 +0000 (11:32 +0900)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Mon, 26 Sep 2022 17:01:08 +0000 (13:01 -0400)
commit752be5c5c910a1a270e97b5b39c7a7d06a39e7c6
tree6de3d456aaabcb0bae82c40f8d9c4630428a0f54
parentf76349cf41451c5c42a99f18a9163377e4b364ff
tracing/eprobe: Add eprobe filter support

Add the filter option to the event probe. This is useful if user wants
to derive a new event based on the condition of the original event.

E.g.
 echo 'e:egroup/stat_runtime_4core sched/sched_stat_runtime \
        runtime=$runtime:u32 if cpu < 4' >> ../dynamic_events

Then it can filter the events only on first 4 cores.
Note that the fields used for 'if' must be the fields in the original
events, not eprobe events.

Link: https://lkml.kernel.org/r/165932114513.2850673.2592206685744598080.stgit@devnote2
Cc: Tzvetomir Stoyanov <tz.stoyanov@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
kernel/trace/trace_eprobe.c
kernel/trace/trace_probe.h