tracing/kprobes: Show event name in trace output
Show event name in tracing/trace output. This also fixes kprobes events format to comply with other tracepoint events formats. Before patching: <...>-1447 [001] 1038282.286875: do_sys_open+0x0/0xd6: ... <...>-1447 [001] 1038282.286878: sys_openat+0xc/0xe <- do_sys_open: ... After patching: <...>-1447 [001] 1038282.286875: myprobe: (do_sys_open+0x0/0xd6) ... <...>-1447 [001] 1038282.286878: myretprobe: (sys_openat+0xc/0xe <- do_sys_open) ... Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com> Cc: Jim Keniston <jkenisto@us.ibm.com> Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Christoph Hellwig <hch@infradead.org> Cc: Frank Ch. Eigler <fche@redhat.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Jason Baron <jbaron@redhat.com> Cc: K.Prasad <prasad@linux.vnet.ibm.com> Cc: Lai Jiangshan <laijs@cn.fujitsu.com> Cc: Li Zefan <lizf@cn.fujitsu.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Tom Zanussi <tzanussi@gmail.com> LKML-Reference: <20090910235345.22412.76527.stgit@dhcp-100-2-132.bos.redhat.com> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
This commit is contained in:

committed by
Frederic Weisbecker

parent
eca0d916f6
commit
6e9f23d161
@@ -902,10 +902,13 @@ print_kprobe_event(struct trace_iterator *iter, int flags)
|
||||
event = ftrace_find_event(field->ent.type);
|
||||
tp = container_of(event, struct trace_probe, event);
|
||||
|
||||
if (!trace_seq_printf(s, "%s: (", tp->call.name))
|
||||
goto partial;
|
||||
|
||||
if (!seq_print_ip_sym(s, field->ip, flags | TRACE_ITER_SYM_OFFSET))
|
||||
goto partial;
|
||||
|
||||
if (!trace_seq_puts(s, ":"))
|
||||
if (!trace_seq_puts(s, ")"))
|
||||
goto partial;
|
||||
|
||||
for (i = 0; i < field->nargs; i++)
|
||||
@@ -934,6 +937,9 @@ print_kretprobe_event(struct trace_iterator *iter, int flags)
|
||||
event = ftrace_find_event(field->ent.type);
|
||||
tp = container_of(event, struct trace_probe, event);
|
||||
|
||||
if (!trace_seq_printf(s, "%s: (", tp->call.name))
|
||||
goto partial;
|
||||
|
||||
if (!seq_print_ip_sym(s, field->ret_ip, flags | TRACE_ITER_SYM_OFFSET))
|
||||
goto partial;
|
||||
|
||||
@@ -943,7 +949,7 @@ print_kretprobe_event(struct trace_iterator *iter, int flags)
|
||||
if (!seq_print_ip_sym(s, field->func, flags & ~TRACE_ITER_SYM_OFFSET))
|
||||
goto partial;
|
||||
|
||||
if (!trace_seq_puts(s, ":"))
|
||||
if (!trace_seq_puts(s, ")"))
|
||||
goto partial;
|
||||
|
||||
for (i = 0; i < field->nargs; i++)
|
||||
@@ -1087,7 +1093,7 @@ static int kprobe_event_show_format(struct ftrace_event_call *call,
|
||||
SHOW_FIELD(unsigned long, args[i], tp->args[i].name);
|
||||
trace_seq_puts(s, "\n");
|
||||
|
||||
return __probe_event_show_format(s, tp, "%lx:", "ip");
|
||||
return __probe_event_show_format(s, tp, "(%lx)", "REC->ip");
|
||||
}
|
||||
|
||||
static int kretprobe_event_show_format(struct ftrace_event_call *call,
|
||||
@@ -1106,8 +1112,8 @@ static int kretprobe_event_show_format(struct ftrace_event_call *call,
|
||||
SHOW_FIELD(unsigned long, args[i], tp->args[i].name);
|
||||
trace_seq_puts(s, "\n");
|
||||
|
||||
return __probe_event_show_format(s, tp, "%lx <- %lx:",
|
||||
"func, ret_ip");
|
||||
return __probe_event_show_format(s, tp, "(%lx <- %lx)",
|
||||
"REC->func, REC->ret_ip");
|
||||
}
|
||||
|
||||
#ifdef CONFIG_EVENT_PROFILE
|
||||
|
Reference in New Issue
Block a user