[dtrace-discuss] dtrace syscall:::return arg0 weidness on b56 (
x86)
Adam Leventhal
ahl at eng.sun.com
Wed Jan 31 08:48:21 PST 2007
This is a bit of an historical artifact. At first, the syscall provider just
had its return value in arg0, and the fbt and pid providers had their return
values in arg1 (so that we could use arg0 for the offset of the return site).
We inevitably started writing scripts where we wanted to see the return
values from probes in all three providers, and we made this script easier
to write by replicating the syscall return values in arg1 to match fbt and
pid. We debated briefly about removing the return value from arg0, but
decided that it would be less confusing to have the same data in two places
than to have some non-helpful, non-intuitive value in arg0.
This change was made 4/23/2003 according to the DTrace project's putback log.
Adam
On Wed, Jan 31, 2007 at 07:32:18PM +0300, Anton Youdkevitch wrote:
>
> Michael Schuster wrote:
> >Anton Youdkevitch wrote:
> >>Paul,
> >>
> >>DTrace User Guide states: "The DTrace variable arg1 for the syscall
> >>return probes evaluates to the system calls return value" (p. 41).
> >>So, the return value is passed in arg1 variable not in arg0.
> >
> >ah, but in the chapter on the syscall provider, it says, "For return
> >probes, both arg0 and arg1 contain the return value." (p. 223)
> >
> >so that is not the mistake, I guess (or if, then it's the doc and not
> >the script).
> Oops! You are right. Seems to be syscall provider specific property.
> From the doc I've got a feeling that arg1 is always used to put return
> value to.
> Sorry then. :(
>
> --
> Anton
> _______________________________________________
> dtrace-discuss mailing list
> dtrace-discuss at opensolaris.org
--
Adam Leventhal, Solaris Kernel Development http://blogs.sun.com/ahl
More information about the dtrace-discuss
mailing list