BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News JDK Mission Control 9.0.0 Requires JDK 17

JDK Mission Control 9.0.0 Requires JDK 17

Marcus Hirt, director of engineering at Datadog, released JDK Mission Control 9.0.0 almost three years after the release of JDK Mission Control 8. The new release requires JDK 17 and contains several bug fixes and new features such as support for Eclipse 4.30.

Java Flight Recorder (JFR) is a framework for profiling and event collection built into the JDK. JDK Mission Control (JMC) contains a JMX Console, a tool for heap waste analysis and allows the visualization and automated analysis of Java flight recordings.

The new release runs on JDK 17 or newer and contains 118 bug fixes and new features. It also allows for parsing JFR recordings from OpenJDK 8u272+ and Oracle JDK 7u40+.

The JVM refresh interval, used to detect new JVMs, may now be configured via Preferences | JDK Mission Control | JVM Browser | Local. By default, JMC will detect new JVMs every 5000 ms.

The performance of the JFR parser is improved by reducing the number of allocations.

Several non-Eclipse dependent classes have moved from other modules to the org.openjdk.jmc.common package in order to make them available for applications using jmc-core.

Dark mode was introduced and can be enabled via Preferences, General | Appearance, and then the Dark theme can be selected.

Searching in the Event Browser now also supports event type IDs.

Previously, the flame graph visualization was implemented in an embedded browser component provided by the Eclipse platform. Performance has been improved, and the view is now based on a Swing-based solution.

JMC now allows starting a flight recording on a GraalVM native image, which was previously not possible.

JMC is available for Windows, macOS X and Linux, where the new release now supports Linux on aarch64, which is among others used by some Raspberry Pi's.

The source code and building instructions are available on GitHub. JDK 17 is required in order to build the project. An entry for JDK 17 should be added to the Maven Toolchain by configuring the ~/.m2/toolchains.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<toolchains>
  <toolchain>
    <type>jdk</type>
    <provides>
      <id>JavaSE-17</id>
      <version>17</version>
      <vendor>[JDK vendor]</vendor>
    </provides>
    <configuration>
      <jdkHome>[JDK directory]</jdkHome>
    </configuration>
  </toolchain>
</toolchains>

The build.sh script may be used on Linux or macOS and provides the following options:

usage: call ./build.sh with the following options:
   --test                  	to run the tests
   --testUi                	to run the tests including UI tests
   --installCore           	to install JMC core
   --packageJmc            	to package JMC
   --packageAgent          	to package Agent
   --skipJDPMulticastTests 	skip multicast related tests
   --clean                 	to run maven clean
   --run                   	to run JMC, once it is packaged
   --runAgentExample       	to run Agent 'InstrumentMe' example, once it is packaged
   --runAgentConverterExample  to run Agent 'InstrumentMeConverter' example, once it is packaged
   --help                  	to show this help dialog

First, the project should be built with the ./build.sh --packageJmc command and after a successful build, the application can be started with the ./build.sh run command. More detailed usage instructions are available on GitHub and the JMC FAQ.

JMC is optimized to run on Eclipse IDE 2023-12 and later. JMC can be installed in Eclipse via the update site Help | Install New Software, the URL for the update side is vendor specific.

Builds for JDK Mission Control are provided by various vendors such as Oracle's JDK Mission Control, Bellsoft's Liberica Mission Control, Adoptium’s Eclipse Mission Control and Azul's Zulu Mission Control. At the time of writing, these vendors didn't yet offer builds for JMC 9.0.0.

The complete list of changes for this release can be found in this blog post, and detailed instructions on how to use the new version are available on GitHub.

Hirt has also created the JDK Mission Control Tutorial and the jmc-jshell tool. Both aren't specific for this latest release, but make it easier to experiment with JFR and JMC.

About the Author

Rate this Article

Adoption
Style

BT