BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Java Flight Recorder Coming to OpenJDK 8

Java Flight Recorder Coming to OpenJDK 8

This item in japanese

Lire ce contenu en français

Java Flight Recorder (JFR) is in the process of being merged into the OpenJDK 8 tree, after having completed its early access release as reported by InfoQ in November last year. This will allow OpenJDK 8 builds – provided that they are built with an --enable-jfr compile time flag – to use Java Flight Recorder for lightweight recording of events for later analysis with Java Mission Control. There has been a proposal to enable JFR by default, in effect flipping the switch into a --disable-jfr flag for those builds of OpenJDK 8 that wish to disable the feature.

While Oracle Java 8 builds ship with JFR enabled, they are only available under a commercial license. Since up-to-date Java 8 builds are not freely available from Oracle, developers have migrated to use OpenJDK 8 builds from either AdoptOpenJDK or from other channels, such as with RedHat or with Zing from Azul. However, because builds from the Adopt OpenJDK site are built directly from upstream sources, they don't contain JFR yet. Once the change is merged in, JFR will be available to all builds from that branch. Azul ships its Zulu-8 builds with the early access support for JFR enabled.

Flight recordings can be opened and analysed with Java Mission Control, or installed as an Eclipse plugin, which recently released JMC-7.1. Builds of JMC 7.1 are available from both Azul, which can be used for processing both Java 8 and Java 11 releases, or from RedHat 8.1.1. The version 7 stream is built from the original Mercurial repository at hg.openjdk.java.net, but as an early adopter of Project Skara, which aims to convert from Mercurial to Git and subsequently to migrate to GitHub, future development for version 8 is being conducted from the new openjdk/jmc GitHub repository. AdoptOpenJDK has nightly builds of JMC for the upcoming version 8 release.

The technology behind JFR continues to evolve, with Java 14 enabling JEP 349 which allows streaming of events from a JVM rather than having to dump and load a recording for analysis. This will allow future JVMs to be able to upload metrics continuously using the JFR interface to a data collection engine for dashboard reporting. Java 14 is in early access release which is scheduled to release as final next month. Marcus Hirt, the main developer of JMC, has created an open tracing plugin that will integrate open span scopes into JFR recordings for more detailed analysis.

Rate this Article

Adoption
Style

BT