This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH -tip v9 7/7] tracing: add kprobe-based event tracer
- From: Ananth N Mavinakayanahalli <ananth at in dot ibm dot com>
- To: Masami Hiramatsu <mhiramat at redhat dot com>
- Cc: Ingo Molnar <mingo at elte dot hu>, Steven Rostedt <rostedt at goodmis dot org>, lkml<linux-kernel at vger dot kernel dot org>, systemtap<systemtap at sources dot redhat dot com>, kvm<kvm at vger dot kernel dot org>, DLE<dle-develop at lists dot sourceforge dot net>, Christoph Hellwig <hch at infradead dot org>, Frederic Weisbecker <fweisbec at gmail dot com>, Tom Zanussi <tzanussi at gmail dot com>
- Date: Fri, 5 Jun 2009 14:06:13 +0530
- Subject: Re: [PATCH -tip v9 7/7] tracing: add kprobe-based event tracer
- References: <20090602003709.29255.48248.stgit@localhost.localdomain> <20090602003754.29255.37212.stgit@localhost.localdomain>
- Reply-to: ananth at in dot ibm dot com
On Mon, Jun 01, 2009 at 08:37:54PM -0400, Masami Hiramatsu wrote:
> Add kprobes-based event tracer on ftrace.
>
> This tracer is similar to the events tracer which is based on Tracepoint
> infrastructure. Instead of Tracepoint, this tracer is based on kprobes(kprobe
> and kretprobe). It probes anywhere where kprobes can probe(this means, all
> functions body except for __kprobes functions).
>
> Similar to the events tracer, this tracer doesn't need to be activated via
> current_tracer, instead of that, just set probe points via
> /sys/kernel/debug/tracing/kprobe_events. And you can set filters on each
> probe events via /sys/kernel/debug/tracing/events/kprobes/<EVENT>/filter.
>
> This tracer supports following probe arguments for each probe.
>
> %REG : Fetch register REG
> sN : Fetch Nth entry of stack (N >= 0)
> @ADDR : Fetch memory at ADDR (ADDR should be in kernel)
> @SYM[+|-offs] : Fetch memory at SYM +|- offs (SYM should be a data symbol)
> aN : Fetch function argument. (N >= 0)
> rv : Fetch return value.
> ra : Fetch return address.
> +|-offs(FETCHARG) : fetch memory at FETCHARG +|- offs address.
>
> See Documentation/trace/kprobes.txt for details.
>
> Changes from v8:
> - Fix wrong argument offsets in format.
> - Remove EVENT_TRACING selection in Kconfig.
> - Fix debugfs file path.
>
> Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
> Cc: Christoph Hellwig <hch@infradead.org>
> Cc: Steven Rostedt <rostedt@goodmis.org>
> Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
> Cc: Ingo Molnar <mingo@elte.hu>
> Cc: Frederic Weisbecker <fweisbec@gmail.com>
> Cc: Tom Zanussi <tzanussi@gmail.com>
The kprobe usage look fine.
Tested on x86 and works fine too! Great work, Masami.
Acked-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>