From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30517 invoked by alias); 11 May 2009 10:54:02 -0000 Received: (qmail 30508 invoked by uid 22791); 11 May 2009 10:54:01 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_54,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx3.mail.elte.hu (HELO mx3.mail.elte.hu) (157.181.1.138) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 11 May 2009 10:53:56 +0000 Received: from elvis.elte.hu ([157.181.1.14]) by mx3.mail.elte.hu with esmtp (Exim) id 1M3T8e-0007V5-TP from ; Mon, 11 May 2009 12:53:41 +0200 Received: by elvis.elte.hu (Postfix, from userid 1004) id 9D8043E213A; Mon, 11 May 2009 12:53:37 +0200 (CEST) Date: Mon, 11 May 2009 10:54:00 -0000 From: Ingo Molnar To: Christoph Hellwig Cc: Masami Hiramatsu , Steven Rostedt , lkml , systemtap , kvm , Ananth N Mavinakayanahalli , Frederic Weisbecker , Tom Zanussi Subject: Re: [PATCH -tip v5 4/7] tracing: add kprobe-based event tracer Message-ID: <20090511105337.GF4648@elte.hu> References: <20090509004829.5505.38720.stgit@localhost.localdomain> <20090509004859.5505.18729.stgit@localhost.localdomain> <20090511093224.GC23875@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090511093224.GC23875@infradead.org> User-Agent: Mutt/1.5.18 (2008-05-17) Received-SPF: neutral (mx3: 157.181.1.14 is neither permitted nor denied by domain of elte.hu) client-ip=157.181.1.14; envelope-from=mingo@elte.hu; helo=elvis.elte.hu; X-ELTE-VirusStatus: clean X-ELTE-SpamScore: -1.5 X-ELTE-SpamLevel: X-ELTE-SpamCheck: no X-ELTE-SpamVersion: ELTE 2.0 X-ELTE-SpamCheck-Details: score=-1.5 required=5.9 tests=BAYES_00 autolearn=no SpamAssassin version=3.2.5 -1.5 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] X-IsSubscribed: yes Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2009-q2/txt/msg00536.txt.bz2 * Christoph Hellwig wrote: > On Fri, May 08, 2009 at 08:48:59PM -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). > > That's some pretty cool functionality, especially together with > patch 7. Yes. I insisted on this model, because this is essentially kprobes-done-right. Exposing unsafe kernel instrumentation APIs was a big mistake to merge upstream, it delayed the proper design of this stuff by almost a decade. There's two more details to be solved before this can go into the tracing tree. > But as with so many tracing bits in the kernel it's just lowlevel > bits without a good user interface. We'd really need some > high-level way for sysadmins/developers to use it. E.g. a version > of the systemtap compiler that doesn't build a kernel module but > instead uses the event tracer + the kprobes tracer. Yes, exactly. > Or a model like Tom's zedtrace where a perl script would do the > dwarf lookups and generates these probes in addition to the > filtered event traces. Correct, that's the other, IMHO superior direction that is being pursued. If you look at the evolution of the filter code it gives the seeds for safe scripting done in the kernel. Such filters/scripts can then be reused for a whole lot more stuff, such as security rules. (netfilters could use it too, etc.) Ingo