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


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...

Josh


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