tracing/probes: Fix tracepoint event with $arg* to fetch correct argument
authorMasami Hiramatsu (Google) <mhiramat@kernel.org>
Mon, 12 Jun 2023 11:58:57 +0000 (20:58 +0900)
committerMasami Hiramatsu (Google) <mhiramat@kernel.org>
Fri, 23 Jun 2023 08:35:49 +0000 (17:35 +0900)
commit53431798f4bb60d214ae1ec4a79eefdd414f577b
treedd00af259a7a2817255ddf343c544cde2a08f9f4
parenta2bd0c08a459b4cb8da57cc9c754de5e45d7a61e
tracing/probes: Fix tracepoint event with $arg* to fetch correct argument

To hide the first dummy 'data' argument on the tracepoint probe events,
the BTF argument array was modified (skip the first argument for tracepoint),
but the '$arg*' meta argument parser missed that.

Fix to increment the argument index if it is tracepoint probe. And decrement
the index when searching the type of the argument.

Link: https://lore.kernel.org/all/168657113778.3038017.12245893750241701312.stgit@mhiramat.roam.corp.google.com/
Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
kernel/trace/trace_probe.c