How does Yourkit measure the time spent on the unsafe.park own method?

I know that Yourkit measures the time on the wall for methods like Thread.sleep (), but what about the unsafe.park native method? Bellows are sampling parameters:

walltime = java.io.RandomAccessFile: readBytes (byte [], int, int) walltime = java.io.RandomAccessFile: read () walltime = java.io.RandomAccessFile: write (int) walltime = java.io.RandomAccessFile: writeBytes (byte [], int, int) walltime = java.net.SocketInputStream: socketRead0 (java.io.FileDescriptor, byte [], int, int, int) walltime = java.net.SocketOutputStream: socketWrite0 (java.io.FileDescriptor , byte [], int, int) walltime = java.lang.Thread: sleep (*)

sampling_period_ms = 20

It seemed that unsafe.park () was not using walltime, so it should be CPU time. Based on Yourkit documentation, CPU time is the actual time the processor spent on this method, and not just the time between the input and output of the method.

Yourkit showed that a lot of time is spent on the park () method, but I do not think that the processor spent a lot of time on the park () method. Could you confirm this? Thank.

+4
source share
1 answer

By default, MyKit Profiler does not show Unsafe.park (). A mediation agent measures time, but the user interface does not show it. To change this, specify -Dyjp.zero.time.methods = false in yjp.ini and restart the profiler user interface.

+4

All Articles