On Wed, 2007-11-07 at 15:48 -0500, Rayson Ho wrote: > On Nov 7, 2007 3:35 PM, Neelam <[EMAIL PROTECTED]> wrote: > > You can see two release probes here, because I was trying to find out the > > duration of outermost lock, when there is nesting. > > > > And for the timing measurement in the c code, I think it must be the user > > level gethrtime()..I include #include <sys/time.h> for using it. > > Right, so what I said yesterday was correct. > > gethrtime() is a fast trap system call, so calling it has very little > overhead. But using DTrace to instrument your code is expensive. In > fact, going so deep from the userland all the way to the DTrace logic > is way more expensive than a getpid(2), which is already slower than a > fast trap system call.
I have troubles correlating the two statements you've made. Is it that you're suggesting NOT to use DTrace because it is slower than manually inserted timing calls around each pthread_mutex_[un]lock ? Thanks, Roman. _______________________________________________ dtrace-discuss mailing list [email protected]
