jProfiler为什么将Unsafe.park/unpark显示为使用CPU周期? [英] Why does jProfiler show Unsafe.park/unpark as using CPU cycles?

查看:358
本文介绍了jProfiler为什么将Unsafe.park/unpark显示为使用CPU周期?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用大量的ExecutorServices运行服务.

We're running a service using quite a lot of ExecutorServices.

使用jProfiler 7.1(采样,可运行)对服务进行性能分析时,我们可以看到sun.misc.Unsafe.park + unpark当前是使用热点中大部分CPU时间的调用.

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

这令人困惑.

停放和取消停放应被阻止,因此不要使用任何CPU周期(或至少使用很少的周期). 是来自jprofiler的某种错误(即未检测到,因为它在sun.misc软件包中?),或者在我们使用ExecutorService框架时实际上存在问题吗?

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?

推荐答案

此问题已在JProfiler 7.1.1中修复.当您断开连接并重新连接到已配置的JVM时,可能会发生这种情况.

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

这篇关于jProfiler为什么将Unsafe.park/unpark显示为使用CPU周期?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆