BT

InfoQ Homepage News Java Flight Recorder Coming to OpenJDK 8

Java Flight Recorder Coming to OpenJDK 8

This item in japanese

Bookmarks

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

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

  • Timeline - When was JFR merged into OpenJDK 8

    by Ani William /

    Your message is awaiting moderation. Thank you for participating in the discussion.

    Was JFR merged into the OpenJDK 8 tree from the beginning or is this a recent event?

  • Re: Timeline - When was JFR merged into OpenJDK 8

    by Alex Blewitt /

    Your message is awaiting moderation. Thank you for participating in the discussion.

    This is a recent thing; in fact, since the post was written, it's undergone approval to be merged in. That said, I don't know when we'll see OpenJDK with JFR merged in place, but I would expect to see that soon.

    mail.openjdk.java.net/pipermail/jdk8u-dev/2020-...

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

BT

Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
Country/Zone:
State/Province/Region:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.