I knew the latter and forgot the former.

Doesn't the timex struct count as a kernel structure?

And just to make sure, if I want to see the values in
the struct when ntp_adjtime returns, I need to do the
copyin again, right?

Jon Haslam wrote:
>> What determines what struct dtrace knows about by default?
>>
>> I am trying to use dtrace to trace the input and output to
>> the ntp_adjtime call. The ntp_adjtime call takes a single
>> argument, namely a pointer to a timex struct. Even though
>> that struct is the argument to a syscall, dtrace doesn't
>> seem to know about the struct type. I was a bit surprised
>> by that.
> How are you trying to reference the struct timex in the syscall?
> You probably know this but the syscall provider doesn't provide
> typed arguments:
> 
> http://wikis.sun.com/display/DTrace/syscall+Provider#syscallProvider-Arguments
> 
> That's something that we'd like to do in the fullness of time :-) .
> In the meantime the following should do what you need:
> 
> syscall::ntp_adjtime:entry
> {
>     this->tx = (struct timex *)copyin(arg0, sizeof(struct timex));
>     ...
> }
> 
> On a more general note around type information usage - we only make
> use of kernel CTF data and therefore only kernel and intrinsic D
> types are available for use. Although ON libraries ship with CTF we
> currently don't make use of this information but this is something
> we'd like to get around to doing sometime.
> 
> 
> Jon.
> _______________________________________________
> dtrace-discuss mailing list
> [email protected]

-- 
blu

"You've added a new disk. Do you want to replace your current
drive, protect your data from a drive failure or expand your
storage capacity?" - Disk management as it should be.
----------------------------------------------------------------------
Brian Utterback - Solaris RPE, Sun Microsystems, Inc.
Ph:877-259-7345, Em:brian.utterback-at-ess-you-enn-dot-kom
_______________________________________________
dtrace-discuss mailing list
[email protected]

Reply via email to