From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11524 invoked by alias); 5 Jul 2008 12:12:48 -0000 Received: (qmail 11509 invoked by uid 22791); 5 Jul 2008 12:12:47 -0000 X-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_53,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 05 Jul 2008 12:12:20 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id m65CCJfg029634 for ; Sat, 5 Jul 2008 08:12:19 -0400 Received: from pobox-3.corp.redhat.com (pobox-3.corp.redhat.com [10.11.255.67]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m65CCIq5012906; Sat, 5 Jul 2008 08:12:18 -0400 Received: from touchme.toronto.redhat.com (IDENT:postfix@touchme.yyz.redhat.com [10.15.16.9]) by pobox-3.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m65CBF3J019812; Sat, 5 Jul 2008 08:12:02 -0400 Received: from ton.toronto.redhat.com (ton.yyz.redhat.com [10.15.16.15]) by touchme.toronto.redhat.com (Postfix) with ESMTP id 1DED68001FF; Sat, 5 Jul 2008 08:10:58 -0400 (EDT) Received: from ton.toronto.redhat.com (localhost.localdomain [127.0.0.1]) by ton.toronto.redhat.com (8.13.1/8.13.1) with ESMTP id m65CAfNB032648; Sat, 5 Jul 2008 08:10:41 -0400 Received: (from fche@localhost) by ton.toronto.redhat.com (8.13.1/8.13.1/Submit) id m65CAekW032647; Sat, 5 Jul 2008 08:10:40 -0400 Date: Sat, 05 Jul 2008 12:12:00 -0000 From: "Frank Ch. Eigler" To: Christoph Hellwig Cc: Peter Zijlstra , ksummit-2008-discuss@lists.linux-foundation.org, Roland McGrath , systemtap@sources.redhat.com Subject: Re: [Ksummit-2008-discuss] DTrace Message-ID: <20080705121039.GK2881@redhat.com> References: <20080630192533.GE21660@redhat.com> <20080630201031.GF7988@mit.edu> <20080630204219.GA6631@redhat.com> <20080701024140.GB28143@mit.edu> <20080701070746.C6DAD15420E@magilla.localdomain> <20080701101507.GB22717@mit.edu> <20080701200632.6790A1541F5@magilla.localdomain> <20080701231327.GA5829@mit.edu> <1215251049.6320.15.camel@lappy.programming.kicks-ass.net> <20080705100536.GA18534@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080705100536.GA18534@lst.de> User-Agent: Mutt/1.4.1i X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 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: 2008-q3/txt/msg00047.txt.bz2 Hi - On Sat, Jul 05, 2008 at 12:05:36PM +0200, Christoph Hellwig wrote: > > Also, it would be really great if you could write probes in regular C, > > some pseudo C language just messes up my mind. > > You can write probes in plain C, in fact I do this all the time. what's > missing is a nice and easy to use channel to get the traces to userspace > and interpret them, and helper for poking at kernel data structures. Perhaps something like like this: probe kernel.function("foobar") // or kernel.statement("*@dir/file.c:222") { probe_me_harder ($var1, $ptr->field) } %{ #include "linux/something.h" %} function probe_me_harder (v1, f1) %{ struct something *s = (struct something*) THIS->v1; struct something_else *w = (struct something_else*) THIS->f1; call_some_safe_kernel_function__be_careful_out_there (s, w); _stp_printf ("I did something fun with %p and %p\n", s, w); %} # stap -g probe.stp I did something fun with 0xdick and 0xjane. ^C - FChE