如何在Java中找到CPU密集型类? [英] How to find CPU-intensive class in Java?

查看:102
本文介绍了如何在Java中找到CPU密集型类?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用多线程的Java程序。在某些情况下,程序开始使用我的八核系统的三个核心的100%。在正常使用中,程序使用所有内核为1-2%。

I have a big program in Java that uses multithreading. In some cases, the program starts using 100% of three cores of my eight core system. In normal use, the program use all cores at 1-2%. How can I find the class that's overloading cores?

推荐答案

使用与jdk-1.6捆绑在一起的jvisualvm等分析器。 0_10

Use a profiler such as the jvisualvm that is bundled with jdk-1.6.0_10

这篇关于如何在Java中找到CPU密集型类?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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