Which Java thread is hogging the CPU?

前端 未结 12 1769
萌比男神i
萌比男神i 2020-12-07 07:48

Let\'s say your Java program is taking 100% CPU. It has 50 threads. You need to find which thread is guilty. I have not found a tool that can help. Currently I use the follo

12条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-07 08:31

    Just run up JVisualVM, connect to your app and and use the thread view. The one which remains continually active is your most likely culprit.

提交回复
热议问题