JMC 8 release: New graphics and default heap dump analysis are introduced to provide deeper insight
JDK Mission Control (JMC) is the best known dashboard solution for analyzing data collected by the JDK Flight Recorder (JFR), the JDK’s built-in profiling and event collection framework.
The binary version of JMC 8 is now available for download via AdoptOpenJDK and Oracle. JMC 8 provides more insight into applications by introducing new graphics and default heap dump analysis.
JMC is built on top of the Eclipse IDE and can be installed independently or as an Eclipse plug-in. JMC is the successor to JRockit Mission Control, which was created by Appeal Virtual Machine Corporation prior to Oracle’s acquisition of the company in 2008. JMC](github.com/openjdk/jmc) is a (production) profiling and diagnostic tool, as well as a library for parsing and processing.jfr files.
The JMC application provides an overview of all the Java processes running locally. As shown in the figure below, right-click on one of the running Java applications to display available options in a drop-down menu. JMX console used for continuous monitoring of the environment, and MBeans interaction, or on a remote machine call [JCMD] (< https://docs.oracle.com/en/java/javase/13/docs/specs/man/jcmd.html >) in the diagnosis of command. Flight Recording and Dump Heap can be used to create a record and a Heap Dump, respectively, for further analysis.
JDK Task Control (JMC) is best known for its dashboard solution for analyzing data collected by the JDK Flight Recorder (JFR), the JDK’s built-in profiling and event collection framework. The binary version of JMC 8 is now available for download via AdoptOpenJDK and Oracle. JMC 8 provides more insight into applications by introducing new graphics and default heap dump analysis.
JMC is built on top of the Eclipse IDE and can be installed independently or as an Eclipse plug-in. JM C is the successor to JRockit Mission Control, which was created by Appeal Virtual Machine Corporation prior to Oracle’s acquisition of the company in 2008. JMC is a (production) profiling and diagnostic tool, as well as a library for parsing and processing.jfr files.
The JMC application provides an overview of all the Java processes running locally. As shown in the figure below, right-click on one of the running Java applications to display available options in a drop-down menu. JMX console used for continuous monitoring of the environment, and MBeans interaction, or on a remote machine call [JCMD] (< https://docs.oracle.com/en/java/javase/13/docs/specs/man/jcmd.html >) in the diagnosis of command. Flight records and Dump Heap can be used to create records and Heap dumps, respectively, for further analysis.
JFR is a command-line tool that previously required a license fee in production environments. However, as of OpenJDK 8U272, it is available for free. The resulting data is stored as.jfr files. You can also click “Start Flight Recording” from the JMC application. The Flight Log wizard displays record types and a list of events to collect.
The main feature of JFR is that it can be used in a production environment with low overhead. During the recording process, about two to four MEgabytes of data are stored for 100,000 events per minute, including many stack traces. The cost of JFR depends on the measurements you choose. By default, it costs less than 2%.
JOverflow is an optional plug-in that provides advanced heap dump analysis and is now included in JMC 8 by default. In this release, the plug-in is converted to the Standard Widget Kit (SWT). JOverflow also provides insight into Java heaps and assists developers in optimizing the heap. To get started, create and open a heap dump in your JMC application. JOverflow’s features, such as hierarchical tree graphs, can be used to improve the heap usage of applications.
The flame view has been improved to use the standard view, as shown below. This view is used to display a stack trace summary of the selected event.
New to JMC 8 is the graph view, which is a directed graph with a separate method for each node.
The figure above also shows method profiles that were removed in JMC 7, predecessors and successors. However, due to customer demand, they were reintroduced in JMC 8.
Graph View is not currently supported on Windows. For other supported operating systems, check the empty graph output from the JMC console, as there may be times when you need to install WebKit. For example, on Linux, WebKit is installed as follows.
Apt install libwebkit2gtk - 4.0 - dev.Copy the code
JMC 8
JMC 8 marks the first release of JMC Agent. JFR event declarations are added to any code base through the proxy. The agent uses the JMX API to control the tools. Events can be used to capture elements such as field and parameter values.
The new Rules API 2.0 makes it possible to use intermediate results of other Rules. JFR Writer was introduced as a new core module. It can be used for testing purposes by writing events to Java buffers.
JMC 8 has considered the areas that need to be improved in future releases of JMC. A new allocation event was introduced in JDK 16. In some cases, allocation events occur so frequently that performance is affected. The new solution uses data production rates rather than sampling at specific points in time to reduce overhead.
Graphical visualizers also present some performance challenges when displaying large amounts of data and nodes. Marcus Hirt explains that these will be improved based on papers on graph pruning in noise networks.
Flame Graph and Graph Views work based on Counts and work well for CPU load. For allocation, however, it is best to use memory as a metric. This will be solved by adding a property selector to the graph.
JMC agent, now part of JMC, will be improved in the future. For example, you can right click on the stack frame to retrieve more detailed information.
Marcus Hirt, Director of Engineering at Datadog and project lead on the OpenJDK JMC project, has written several interesting JMC-related blog posts and a tutorial. For more information, watch his talks at JMC 8 and other discussion sessions.
This article translated from www.infoq.com/news/2021/0…