> I knew the latter and forgot the former. > > Doesn't the timex struct count as a kernel structure?
It is in the kernel, yes. However, we don't export the argument types for the syscall providers probes so you can't reference them through the typed args[] array. You can cast to this type as my example showed and we just "magically" know what a "struct timex" is owing to the CTF. > 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? Yes. As has been mentioned though, using fbt may be easier for you. You always have options with DTrace! Jon. > 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] >> > > _______________________________________________ dtrace-discuss mailing list [email protected]
