1 Feb 2006 01:17
RE: rethinking syscall tapset
Stone, Joshua I <joshua.i.stone <at> intel.com>
2006-02-01 00:17:59 GMT
2006-02-01 00:17:59 GMT
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
RSS Feed