From mboxrd@z Thu Jan 1 00:00:00 1970 From: Frederic Weisbecker Subject: Re: [PATCH -tip v14 08/12] tracing: add kprobe-based event tracer Date: Wed, 19 Aug 2009 03:23:08 +0200 Message-ID: <20090819012306.GJ5231@nowhere> References: <20090813203403.31965.20973.stgit@localhost.localdomain> <20090813203510.31965.29123.stgit@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Ingo Molnar , Steven Rostedt , lkml , systemtap , kvm , DLE , Ananth N Mavinakayanahalli , Avi Kivity , Andi Kleen , Christoph Hellwig , "Frank Ch. Eigler" , "H. Peter Anvin" , Jason Baron , Jim Keniston , "K.Prasad" , Lai Jiangshan , Li Zefan , =?utf-8?B?UHJ6ZW15c8WCYXdQYXdlxYJjenlr?= , Roland McGrath , Sam Ravnborg , Srikar Dronamraju , Tom Zanussi , Vegard Nossum To: Masami Hiramatsu Return-path: Received: from ey-out-2122.google.com ([74.125.78.25]:5821 "EHLO ey-out-2122.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751409AbZHSBXM (ORCPT ); Tue, 18 Aug 2009 21:23:12 -0400 Content-Disposition: inline In-Reply-To: <20090813203510.31965.29123.stgit@localhost.localdomain> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, Aug 13, 2009 at 04:35:11PM -0400, Masami Hiramatsu wrote: > Add kprobes-based event tracer on ftrace. >=20 > This tracer is similar to the events tracer which is based on Tracepo= int > infrastructure. Instead of Tracepoint, this tracer is based on kprobe= s > (kprobe and kretprobe). It probes anywhere where kprobes can probe(th= is > means, all functions body except for __kprobes functions). >=20 > Similar to the events tracer, this tracer doesn't need to be activate= d via > current_tracer, instead of that, just set probe points via > /sys/kernel/debug/tracing/kprobe_events. And you can set filters on e= ach > probe events via /sys/kernel/debug/tracing/events/kprobes//fil= ter. >=20 > This tracer supports following probe arguments for each probe. >=20 > %REG : Fetch register REG > sN : Fetch Nth entry of stack (N >=3D 0) > sa : Fetch stack address. > @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 >=3D 0) > rv : Fetch return value. > ra : Fetch return address. > +|-offs(FETCHARG) : fetch memory at FETCHARG +|- offs address. >=20 > See Documentation/trace/kprobetrace.txt for details. >=20 > Changes from v13: > - Support 'sa' for stack address. > - Use call->data instead of container_of() macro. >=20 > Signed-off-by: Masami Hiramatsu > Acked-by: Ananth N Mavinakayanahalli > Cc: Avi Kivity > Cc: Andi Kleen > Cc: Christoph Hellwig > Cc: Frank Ch. Eigler > Cc: Frederic Weisbecker > Cc: H. Peter Anvin > Cc: Ingo Molnar > Cc: Jason Baron > Cc: Jim Keniston > Cc: K.Prasad > Cc: Lai Jiangshan > Cc: Li Zefan > Cc: Przemys=C5=82aw Pawe=C5=82czyk > Cc: Roland McGrath > Cc: Sam Ravnborg > Cc: Srikar Dronamraju > Cc: Steven Rostedt > Cc: Tom Zanussi > Cc: Vegard Nossum > --- >=20 > Documentation/trace/kprobetrace.txt | 139 ++++ I'll probably split this commit to have the first version of the documentation as a separate patch in order to lighten this. =46rederic.