简体   繁体   中英

Java Flight Recorder File Format Not Supported

I am trying to profile the run of my Java code using Java Flight Recorder (JFR). To do this, I am using the terminal command:

java -XX:+UnlockCommercialFeatures -XX:+FlightRecorder -XX:StartFlightRecording=duration=500s,filename=myrecording.jfr -jar runnableJARFile.jar

This runs my program & seemingly creates the .jfr recording file, however when I try to open it in Java Mission Control, I get the error:

'Loading events from myrecording.jfr' has encountered a problem.

The file format of myrecording.jfr is not supported. Try with a more recent version of Mission Control.

However, I have checked and I am running JMC 6.0.0 (which appears to be the latest) version, as well as JDK 11.0.0 (also seems to be the latest version). When I check for updates, both show to be up to date.

Any ideas how to get the JFR file to open in JMC?

NOTE: I am using Eclipse as an IDE, however can't seem to get the flight recording to start simultaneously with the program; this is why I am using terminal. (Running OS X El Capitan)

Try the early access build of JMC 7 (which is now open source). That is what's designed to work with JDK 11 (and earlier) https://jdk.java.net/jmc/

(JMC is generally backwards compatible)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM