[Just starting out with DTrace and was hoping to get some guidance.]

I have a "benchmark" program that I monitored with both prstat (prstat -mL -P 
<PID>) and pfilestat (from the DTrace toolkit). Prstat reports LAT values in 
the 0.1-0.2% range, but pfilestat reports "waitcpu" values in the 6-10%. Since 
those two numbers supposedly represent time waiting for the CPU, I'm wondering 
why they are so different for the same application (over the same time period).

On a side note, the pfilestat script (I think) assumes that a "read entry" will 
be followed by a "read return" probe. On a per-thread basis, I can see this 
happening, but if the application has multiple threads/readers/writers, isn't 
it possible to get interleaved syscalls? For example,

Thread1-> read entry
Thread2 -> write entry
Thread1 -> read return
Thread2 -> write return

If so, then shouldn't the pfilestat script be using thread local variables for 
timing versus globabl variables?


--
This message posted from opensolaris.org
_______________________________________________
dtrace-discuss mailing list
[email protected]

Reply via email to