This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH tracing/kprobes 5/7] tracing/kprobes: Add argument name support
- From: Steven Rostedt <rostedt at goodmis dot org>
- To: Masami Hiramatsu <mhiramat at redhat dot com>
- Cc: Frederic Weisbecker <fweisbec at gmail dot com>, Ingo Molnar <mingo at elte dot hu>, lkml <linux-kernel at vger dot kernel dot org>, systemtap <systemtap at sources dot redhat dot com>, DLE <dle-develop at lists dot sourceforge dot net>, Jim Keniston <jkenisto at us dot ibm dot com>, Ananth N Mavinakayanahalli <ananth at in dot ibm dot com>, Andi Kleen <ak at linux dot intel dot com>, Christoph Hellwig <hch at infradead dot org>, "Frank Ch. Eigler" <fche at redhat dot com>, "H. Peter Anvin" <hpa at zytor dot com>, Jason Baron <jbaron at redhat dot com>, "K.Prasad" <prasad at linux dot vnet dot ibm dot com>, Lai Jiangshan <laijs at cn dot fujitsu dot com>, Li Zefan <lizf at cn dot fujitsu dot com>, Peter Zijlstra <peterz at infradead dot org>, Srikar Dronamraju <srikar at linux dot vnet dot ibm dot com>, Tom Zanussi <tzanussi at gmail dot com>
- Date: Fri, 11 Sep 2009 10:07:59 -0400
- Subject: Re: [PATCH tracing/kprobes 5/7] tracing/kprobes: Add argument name support
- References: <20090910235258.22412.29317.stgit@dhcp-100-2-132.bos.redhat.com> <20090910235337.22412.77383.stgit@dhcp-100-2-132.bos.redhat.com>
- Reply-to: rostedt at goodmis dot org
On Thu, 2009-09-10 at 19:53 -0400, Masami Hiramatsu wrote:
> @@ -870,9 +892,13 @@ print_kprobe_event(struct trace_iterator *iter, int flags)
> {
> struct kprobe_trace_entry *field;
> struct trace_seq *s = &iter->seq;
> + struct trace_event *event;
> + struct trace_probe *tp;
> int i;
>
> field = (struct kprobe_trace_entry *)iter->ent;
> + event = ftrace_find_event(field->ent.type);
> + tp = container_of(event, struct trace_probe, event);
Can this function be called the data is in the ring buffer, but the
probe has been unregistered? If so, the result of ftrace_find_event be
NULL?
-- Steve
>
> if (!seq_print_ip_sym(s, field->ip, flags | TRACE_ITER_SYM_OFFSET))
> goto partial;
> @@ -881,7 +907,8 @@ print_kprobe_event(struct trace_iterator *iter, int flags)
> goto partial;
>
> for (i = 0; i < field->nargs; i++)
> - if (!trace_seq_printf(s, " 0x%lx", field->args[i]))
> + if (!trace_seq_printf(s, " %s=%lx",
> + tp->args[i].name, field->args[i]))
> goto partial;
>
> if (!trace_seq_puts(s, "\n"))