This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: rethinking syscall tapset
- From: James Dickens <jamesd dot wi at gmail dot com>
- To: "Stone, Joshua I" <joshua dot i dot stone at intel dot com>
- Cc: systemtap at sources dot redhat dot com
- Date: Tue, 31 Jan 2006 20:04:23 -0600
- Subject: Re: rethinking syscall tapset
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=rpDqrA4hcYV1L1qhpuBgWpKUFtB3M/4+xGseJOaLsN+HSZBzourE4kWGNQ1QIzwc0mcQMHqAA7yVydZ37dho52CMsNGciFVxy0FXPcPrrMat8lrfIaYmI7sW1aERw2VpedMX2z3pVy7dNA+apxtysKRBBtWe0Xuj7I1rKWdWoec=
- References: <AcYmwhsuJuIFRZcpRjWD/FI1eqkaZwAAWmlA> <CBDB88BFD06F7F408399DBCF8776B3DC0645338E@scsmsx403.amr.corp.intel.com>
On 1/31/06, Stone, Joshua I <joshua.i.stone@intel.com> wrote:
> James Dickens wrote:
> > I don't see a reason to combine both call and return in one block, but
> > I think it would be nice to be able to access all the arguments used
> > to call a syscall, in a way that require each syscall written
> > individually and that is architecturally transparent.
> >
> > probe syscall.* {
> > printf(%s ( "%s called with %X(%d), %X(%d) ", probename, arg0,
> > arg0, arg1, arg1 );
> > }
> >
> > this type of script can be quite useful and is much lighter on the
> > system than strace that only plays games stopping the application at
> > each syscall.
>
> This generic variable-naming is the way Dtrace does things, but I'm not
> sure how much that really buys you...
>
> Your toy script is only useful for functions that have two integer
> arguments. Plus, anything with a pointer is not very informative. It
> would be possible for the syscall tapset to load arg0, arg1, etc. with
> the string representations of each parameter, but then you need to know
> how many arguments to read. So really, you're back to the 'argstr' that
> Martin proposed already...
>
it doesn't need to know the exact number, you support upto 10
arguments, if they aren't used, it will return bogus data. but it does
allow to get the data quickly and easily. The same type of thing also
should be supported with userland probes. Where in a lot of cases we
won't know the type of arguments used if we are dealing with stripped
binaries that are quite common in commercial software. This interface
gives a consistent interface.
James
> Josh
>