This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
RE: rethinking syscall tapset
- From: "Stone, Joshua I" <joshua dot i dot stone at intel dot com>
- To: "James Dickens" <jamesd dot wi at gmail dot com>
- Cc: <systemtap at sources dot redhat dot com>
- Date: Tue, 31 Jan 2006 16:17:59 -0800
- Subject: 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