This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [Ksummit-2008-discuss] DTrace
- From: James Bottomley <James dot Bottomley at HansenPartnership dot com>
- To: Christoph Hellwig <hch at lst dot de>
- Cc: Peter Zijlstra <a dot p dot zijlstra at chello dot nl>, ksummit-2008-discuss at lists dot linux-foundation dot org, Roland McGrath <roland at redhat dot com>, systemtap at sources dot redhat dot com
- Date: Sat, 05 Jul 2008 08:49:49 -0500
- Subject: Re: [Ksummit-2008-discuss] DTrace
- Dkim-signature: v=1; a=rsa-sha256; c=simple/simple; d=hansenpartnership.com; s=2007; t=1215265792; bh=5rRX5ZhKFw5yV7opNop12xZHUuu/aj/fTr+lxJikfa A=; l=1368; h=Subject:From:To:Cc:In-Reply-To:References: Content-Type:Date:Message-Id:Mime-Version: Content-Transfer-Encoding; b=BLjHW/u46+gApcN5n7jgggg0tXb1HsERw1U2R zs6tPZSJ9Wquw84zclApv3gX73XgjFovj8+H/mXS6El1xNrAIeLi6J5+9Jvptf3+Z5f iIMJbb0gbIy/+9UOQu+uL+WQRBA9XVX9XC54a1T7Sm77Zr5wsBxw0tys0JIIvgqU1HE =
- Dkim-signature: v=1; a=rsa-sha256; c=simple/simple; d=hansenpartnership.com; s=2007; t=1215265789; bh=5rRX5ZhKFw5yV7opNop12xZHUuu/aj/fTr+lxJikfa A=; l=1368; h=Subject:From:To:Cc:In-Reply-To:References: Content-Type:Date:Message-Id:Mime-Version: Content-Transfer-Encoding; b=cMNntxNGkwUaTqLhFmIVxlPsTqLCC+pGrp0NI B3dKZ5qI6ruepdVMQW9UgE9truYR9WXE4u3XwFDR0QJ+lxj6mDDhh5Qa8NJHtTE5V6J +grDYRHBTp4jLtO1YgucYsKyr9ejbiHDvGI1WSJohcFK+SkwLqvIzrRbcKjTUDxRNS8 =
- References: <20080630181959.GA7988@mit.edu> <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>
On Sat, 2008-07-05 at 12:05 +0200, Christoph Hellwig wrote:
> On Sat, Jul 05, 2008 at 11:44:09AM +0200, Peter Zijlstra 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.
To be fair, you can simply "just write" entry (jprobes) and return
probes (kretprobes). For the entry probes, if you want access to the
function arguments you need to know the deep magic of the calling
conventions of your platform (pretty easy on x86, though). However,
what you can't just write are the arbitrary kprobes in file x line y
because you need to know all the nasty details of dwarf to have a clue
what the absolute address is and where all the local varaibles you're
trying to look at are. Now ... is using systemtap to do this easier
than printk? For me, yes, since a recompile reboot sequence takes quite
a while, perhaps for someone with a faster machine ...
For getting information back, as you know, systemtap uses relayfs. It's
not the most friendly or efficient thing in the world, so I'm happy to
have it wrappered by systemtap ...
James