This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH -tip 0/8] perf-probe updates
- From: Ingo Molnar <mingo at elte dot hu>
- To: Masami Hiramatsu <mhiramat at redhat dot com>
- Cc: Frederic Weisbecker <fweisbec at gmail dot com>, lkml <linux-kernel at vger dot kernel dot org>, Steven Rostedt <rostedt at goodmis dot org>, Jim Keniston <jkenisto at us dot ibm dot com>, Ananth N Mavinakayanahalli <ananth at in dot ibm dot com>, Christoph Hellwig <hch at infradead dot org>, "Frank Ch. Eigler" <fche at redhat dot com>, Jason Baron <jbaron at redhat dot com>, "K.Prasad" <prasad at linux dot vnet dot ibm dot com>, Peter Zijlstra <peterz at infradead dot org>, Srikar Dronamraju <srikar at linux dot vnet dot ibm dot com>, Arnaldo Carvalho de Melo <acme at redhat dot com>, systemtap <systemtap at sources dot redhat dot com>, DLE <dle-develop at lists dot sourceforge dot net>
- Date: Wed, 9 Dec 2009 09:43:41 +0100
- Subject: Re: [PATCH -tip 0/8] perf-probe updates
- References: <20091208220232.10142.2643.stgit@dhcp-100-2-132.bos.redhat.com> <20091209072220.GA4328@elte.hu>
* Ingo Molnar <mingo@elte.hu> wrote:
> One hickup is that -d/--del does not appear to be working yet:
>
> # perf probe -l
> probe:schedule (on schedule)
>
> # perf probe -d probe:schedule
> Fatal: Failed to write event: Invalid argument
Ah, that was with an older kernel - a freshly booted kernel with
delete-probe syntax worked fine.
There's another small hickup i had - when i typoed 'perf probe -', it
gave me:
# perf probe -
No dwarf info found in the vmlinux - please rebuild with CONFIG_DEBUG_INFO.
An error occurred in debuginfo analysis. Try to use symbols.
Fatal: Failed to write event: Invalid argument
Similar thing happens if i try to probe a non-existent symbol:
# perf probe test
No dwarf info found in the vmlinux - please rebuild with CONFIG_DEBUG_INFO.
An error occurred in debuginfo analysis. Try to use symbols.
Fatal: Failed to write event: Invalid argument
I think we should print something more helpful, such as:
# perf probe test
Fatal: Kernel symbol 'test' not found - probe not added.
the debuginfo printout is not helpful in this case - we should fall back
to symbols silently, unless the nature of the error indicates that we
fail _because_ there's no debuginfo.
Here the failure was because the symbol does not exist.
There's similar problems in most other failure cases. Trying to remove a
non-existent probe gives:
# perf probe -d test
Warning: event "probe:test" is not found.
It should say something like:
# perf probe -d test
Info: event "probe:test" does not exist, could not remove it.
Also, it's possible to add multiple probes to the same function, using
'perf probe schedule' + 'perf probe schedule', etc. While in general it
makes sense to allow it, by default we should refuse the second,
identical probe on the symbol - and add a -f/--force option to force
duplicate probes. I.e. the second probe should print:
# perf probe schedule
Info: event "probe:schedule" already exists. (Use -f to force a duplicate.)
etc. Please try out various sensible and also less sensible options of
this tool and try to make it break - and see whether the behavior is
intuitive and obvious to users - whether the messages are consistent,
etc. etc.
Ingo