I know that Yourkit measures wall time for methods like Thread.sleep(), but what about the unsafe.park native method? Bellows are the sampling settings:
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() is not using walltime, so it must be CPU time. Based on the Yourkit documentation the CPU time is the actual time that CPU spent on this method, not just the time between entrance and exit of the method.
Yourkit showed that a lot of time is spent on the park() method, but I don't think the CPU spent a lot of time on the park() method. Could you please confirm on this? Thanks.
By default YourKit profiler does not show Unsafe.park(). Profiler agent measures time, but UI does not show it. To change this please specify -Dyjp.zero.time.methods=false in yjp.ini and restart the profiler UI.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With