Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java Mission Control (JMC) 6.0 does not show hot methods when examining a JFR flight recording

After using the Java Flight Recording functionality on a running application, Java's JMC could be used to examine the resulting JFR file to show hot methods, and a percentage of CPU time spent in each method. This was very useful for profiling applications and identifying bottlenecks.

Here is an example of what was previously possible in older versions of JMC:

Older JMC version

Older JMC version

This screen seems to be missing in JMC 6.0 that is bundled with Java 10. Here is an example of what I see in the Java 10 bundled JMC 6.0:

JMC 6.0

There seems to be a rudimentary count of method calls, but no Percentage CPU time is listed. There don't appear to be options to add the missing column.

Is there a way to show hot method %CPU time, or has this functionality been removed from JMC 6.0 in JDK10?

like image 582
Andrew Parks Avatar asked Jun 11 '18 14:06

Andrew Parks


People also ask

What is Java Mission Control used for?

JDK Mission Control is an advanced set of tools that enables efficient and detailed analysis of the extensive of data collected by Java Flight Recorder. The tool chain enables developers and administrators to collect and analyze data from Java applications running locally or deployed in production environments.

How does Java flight recorder work?

Java Flight Recorder (JFR) is a tool for collecting diagnostic and profiling data about a running Java application. It is integrated into the Java Virtual Machine (JVM) and causes almost no performance overhead, so it can be used even in heavily loaded production environments.


2 Answers

At time of writing JMC 7.1.2 still doesn't give the chance to see the percentage CPU time. I've found great help read jfr files with VisualVM -> Sampler -> Display -> CPU

VisualVM Sampler Display CPU

like image 113
freedev Avatar answered Nov 07 '22 08:11

freedev


The percentage column is not cpu time, but percentage of the total number of method samples. The same info is displayed as the backdrop in the Count column in JMC 6.0, and I believe if you hover over the column to get the tooltip there might be a percentage number.

I know you are not the first person to miss the percentage column, there is an enhancement request in the JMC Jira for this: https://bugs.openjdk.java.net/browse/JMC-5721

like image 34
Klara Avatar answered Nov 07 '22 06:11

Klara