Why does jProfiler show Unsafe.park/unpark as using CPU cycles?

谁说我不能喝 提交于 2019-12-10 14:58:56

问题


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?


回答1:


This is fixed in JProfiler 7.1.1. It could happen when you disconnected and reconnected to a profiled JVM.



来源:https://stackoverflow.com/questions/9802415/why-does-jprofiler-show-unsafe-park-unpark-as-using-cpu-cycles

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!