This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH -tip tracing/kprobes 0/9] tracing/kprobes, perf: perf probe and kprobe-tracer bugfixes
- From: Frederic Weisbecker <fweisbec at gmail dot com>
- To: Ingo Molnar <mingo at elte dot hu>
- Cc: Masami Hiramatsu <mhiramat at redhat dot com>, Steven Rostedt <rostedt at goodmis dot org>, lkml <linux-kernel at vger dot kernel dot org>, Thomas Gleixner <tglx at linutronix dot de>, Arnaldo Carvalho de Melo <acme at redhat dot com>, Mike Galbraith <efault at gmx dot de>, Paul Mackerras <paulus at samba dot org>, Peter Zijlstra <a dot p dot zijlstra at chello dot nl>, Christoph Hellwig <hch at infradead dot org>, Ananth N Mavinakayanahalli <ananth at in dot ibm dot com>, Jim Keniston <jkenisto at us dot ibm dot com>, "Frank Ch. Eigler" <fche at redhat dot com>, "H. Peter Anvin" <hpa at zytor dot com>, systemtap <systemtap at sources dot redhat dot com>, DLE <dle-develop at lists dot sourceforge dot net>
- Date: Mon, 19 Oct 2009 13:00:57 +0200
- Subject: Re: [PATCH -tip tracing/kprobes 0/9] tracing/kprobes, perf: perf probe and kprobe-tracer bugfixes
- References: <20091017000711.16556.69935.stgit@dhcp-100-2-132.bos.redhat.com> <20091017080203.GA4155@elte.hu> <20091017103427.GA31238@elte.hu> <4ADAAF50.9040604@redhat.com> <20091019075103.GF17960@elte.hu>
On Mon, Oct 19, 2009 at 09:51:03AM +0200, Ingo Molnar wrote:
> > So, what would you think about using -D (def) and -U (undef) ?
>
> The simpest case should be no extra character at all:
>
> perf probe schedule
Yeah, I really prefer that too.
> > > All the other extensions and possibilities - arguments, variables,
> > > source code lines, etc. should be natural and intuitive extensions
> > > of this basic, minimal syntax.
> >
> > Don't you like current space(' ') separated arguments? :-) I mean,
> > what is 'natural' syntax in your opinion?
>
> Yeah, space separated arguments are nice too. The question is how to
> specify a more precise coordinate for the bit we want to probe - and how
> to specify the information we want to extract. Something like:
>
> perf schedule+15
I personally don't imagine common easy usecases that imply relative line
offsets but rather absolute lines.
I guess the most immediate usecase is a direct function probe:
perf probe schedule
Just to know if a function is matched.
If you want more precision, it also means you have you code editor opened
and want to set a precise point. Since you also have the absolute
line directly displayed by your editor, you don't want to calculate the relative
line but rather the absolute one.
Hmm?
Hence I rather imagine the following:
perf probe schedule.c:line
(Unfortunately, schedule:line is shorter but less intuitive
but that could be a shortcut).
> Or this:
>
> perf schedule:'switch_count = &prev->nivcsw'
>
> would insert the probe to the source code that matches that statement
> pattern. Rarely will people want to insert a probe to an absolutely line
> number - that's a usage mode for higher level tools. (so we definitely
> want to support it - but it should not use up valuable spots in our
> options space.) Same goes for symbol offsets, etc. - humans will rarely
> use them.
I don't understand your point. If your editor is opened and you have
the source code in front of you, why would you cut'n'paste a line instead
of actually write the line number?
>
> We also want to have functionality that helps people find probe spots
> within a function:
>
> perf probe --list-lines schedule
>
> Would list the line numbers and source code of the schedule() function.
> (similar to how GDB 'list' works) That way someone can have an ad-hoc
> session of deciding what place to probe, and the line numbers make for
> an easy ID of the statement to probe.
Agreed!
Thanks.