tracing/kprobes: Fix handling of argument names
authorMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Fri, 27 Aug 2010 11:39:06 +0000 (20:39 +0900)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 8 Sep 2010 14:47:19 +0000 (11:47 -0300)
commitaba91595cfcebd193425e20aabc407531526a1c5
tree5473ed5aebc93bb0aea03a17d7ed968ca0e95dce
parent367e94c10092469c896a226a77ef13cf6da757e4
tracing/kprobes: Fix handling of argument names

Set "argN" name for each argument automatically if it has no specified name.
Since dynamic trace event(kprobe_events) accepts special characters for its
argument, its format can show those special characters (e.g. '$', '%', '+').
However, perf can't parse those format because of the character (especially
'%') mess up the format.  This sets "argX" name for those arguments if user
omitted the argument names.

E.g.
 # echo 'p do_fork %ax IP=%ip $stack' > tracing/kprobe_events
 # cat tracing/kprobe_events
 p:kprobes/p_do_fork_0 do_fork arg1=%ax IP=%ip arg3=$stack

Reported-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
LKML-Reference: <20100827113906.22882.59312.stgit@ltc236.sdl.hitachi.co.jp>
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
kernel/trace/trace_kprobe.c