• Masami Hiramatsu's avatar
    tracing/kprobes: Fix handling of argument names · aba91595
    Masami Hiramatsu authored
    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: default avatarSrikar 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: default avatarMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
    Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    aba91595
trace_kprobe.c 45.5 KB