Hi,

I'm looking for a way to measure mutex contention in a Java app running 
on Solaris 10.  I started off by using the dvmti probes 
monitor-contended-enter and monitor-contended-entered, but I found that 
the act of observing these probes skewed my program performance to the 
point that the measurements weren't useful.

I'm thinking of taking a lower-level approach to this.  Is it correct to 
assume that Java object monitors are going to map to a lwp_mutex at some 
point in the call stack?  I replaced my dvmti-based script with this:

syscall::lwp_mutex*:entry
{
   self->ts[probefunc] = timestamp;
}

syscall::lwp_mutex*:return
/self->ts[probefunc] != 0/
{
   duration = timestamp - self->ts[probefunc];
   @times[ tid ] = quantize( duration );
   self->ts[probefunc] = 0;
}

And the timings are pretty much what I'd expect, within an order of 
magnitude.  Can anybody suggest any improvements here, or am I totally 
off-base?

Thanks,

Russ
_______________________________________________
dtrace-discuss mailing list
[email protected]

Reply via email to