This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH tracing/kprobes v3 6/7] perf: Add perf probe subcommand for kprobe-event setup helper
- From: Frederic Weisbecker <fweisbec at gmail dot com>
- To: Masami Hiramatsu <mhiramat at redhat dot com>
- Cc: Steven Rostedt <rostedt at goodmis dot org>, 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>, 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>
- Date: Thu, 8 Oct 2009 23:17:57 +0200
- Subject: Re: [PATCH tracing/kprobes v3 6/7] perf: Add perf probe subcommand for kprobe-event setup helper
- References: <20091007222733.1684.32035.stgit@dhcp-100-2-132.bos.redhat.com> <20091007222822.1684.3251.stgit@dhcp-100-2-132.bos.redhat.com> <4ACE56EE.8060000@redhat.com>
On Thu, Oct 08, 2009 at 05:17:34PM -0400, Masami Hiramatsu wrote:
> Masami Hiramatsu wrote:
>> Add perf probe subcommand for kprobe-event setup helper to perf command.
>> This allows user to define kprobe events by C expressions (C line numbers,
>> C function names, and C local variables).
>>
>> Usage
>> -----
>> perf probe [<options>] -P 'PROBEDEF' [-P 'PROBEDEF' ...]
>>
>> -k, --vmlinux<file> vmlinux/module pathname
>> -P, --probe<p|r:[GRP/]NAME FUNC[+OFFS][@SRC]|@SRC:LINE [ARG ...]>
>> probe point definition, where
>> p: kprobe probe
>> r: kretprobe probe
>> GRP: Group name (optional)
>> NAME: Event name
>> FUNC: Function name
>> OFFS: Offset from function entry (in byte)
>> SRC: Source code path
>> LINE: Line number
>> ARG: Probe argument (local variable name or
>> kprobe-tracer argument format is supported.)
>
> Oops, I found it caused compilation error on gcc < 4.4 as below:
>
> CC builtin-trace.o
> CC builtin-probe.o
> cc1: warnings being treated as errors
> builtin-probe.c: In function 'parse_probepoint':
> builtin-probe.c:109: error: implicit declaration of function 'strndup'
> builtin-probe.c:109: error: incompatible implicit declaration of built-in function 'strndup'
>
> Since I forgot to add _GNU_SOURCE...
>
No problem, I can add it, or rather include util/util.h as it includes
everything necessary for the string functions + _GNU_SOURCE :)