Thread (22 messages) 22 messages, 2 authors, 2023-05-14

Re: [PATCH v9.1 07/11] tracing/probes: Add $$args meta argument for all function args

From: Steven Rostedt <rostedt@goodmis.org>
Date: 2023-05-05 21:49:07
Also in: bpf, lkml

On Tue,  2 May 2023 11:18:21 +0900
"Masami Hiramatsu (Google)" [off-list ref] wrote:
From: Masami Hiramatsu (Google) <mhiramat@kernel.org>

Add the '$$args' meta fetch argument for function-entry probe events. This
Hmm, couldn't we just use $args ? That would be different from $arg1,
$arg2, etc.

The $$ to me would be either the bash pid of current, or perhaps it would
be just to use a dollar sign. I don't see the precedence of $$args being a
"full expand".

-- Steve

will be expanded to the all arguments of the function and the tracepoint
using BTF function argument information.

e.g.
 #  echo 'p vfs_read $$args' >> dynamic_events
 #  echo 'f vfs_write $$args' >> dynamic_events
 #  echo 't sched_overutilized_tp $$args' >> dynamic_events
 # cat dynamic_events
p:kprobes/p_vfs_read_0 vfs_read file=file buf=buf count=count pos=pos
f:fprobes/vfs_write__entry vfs_write file=file buf=buf count=count pos=pos
t:tracepoints/sched_overutilized_tp sched_overutilized_tp rd=rd overutilized=overutilized

Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
---
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help