Java – CPU usage and object wait
•
Java
I use jpprofiler to analyze my application, so in the "CPU view" section, it shows that more than 40% of CPU time is spent on object Wait () But as far as I know, object The wait () CPU did not give the wait thread
Someone can help understand what happened and why the analyzer shows that so much CPU is spent on object Wait?
Solution
In wait (), the parser does not know that the CPU is idle What the profiler knows is that wait () is entered and returned in a few seconds So if these milliseconds take up 40% of the execution time, you have
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码