Why does jProfiler show Unsafe.park/unpark as using CPU cycles?
-
25-05-2021 - |
Question
We're running a service using quite a lot of ExecutorServices.
When profiling the service using jProfiler 7.1 (sampling, Runnable), we can see that sun.misc.Unsafe.park + unpark is currently the calls using most of the CPU time in the hotspot.
http://i.stack.imgur.com/wT2Cj.jpg
This is puzzling.
Park and unpark should be blocking, hence not use any CPU cycles (or at least a low amount). Is this some sort of bug from the jprofiler (i.e. not detecting it, because it's in the sun.misc package?) or is there actually something wrong in our use of the ExecutorService framework?
Solution
This is fixed in JProfiler 7.1.1. It could happen when you disconnected and reconnected to a profiled JVM.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow