This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: rethinking syscall tapset


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
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]