The jfr tool can report its own tool version, using the 'version' command:
$ jfr version
1.0
This only give information on the actual tool's version, and it has stayed 1.0 for the longest. When trying to read a JFR recording of an unsupported version, i.e. 0.9, the command responds with:
$ jfr summary old-recording.jfr
File version 0.9. Only Flight Recorder files of version 1.x and 2.x can be read by this JDK.
It would be good to be able to query the underlying JDK for more information, f.i., the version of the JFR file recording produced, the JFR API version, and other relevant info.
--------------------
Proposed enhancement
--------------------
Add arguments to the version command, and more help text:
jfr version [--tool] (default)
[--recording-file-format]
[--all]
[--file <file>]
--tool
Display version of the jfr tool.
--recording-file-format
Print recording file (.jfr) version this JDK produces.
--file <file>
Print version of supplied JFR recording file.
--all
Print all relevant version info
--------------
Example output
--------------
$ jfr version
1.1
$ jfr version --tool
1.1
$ jfr version --recording-file-format
2.1
$ jfr version --file old-recording.jfr
0.9 (cannot be read by this tool)
$ jfr version --all
jdk.jfr.Recording: 2.1
jdk.jfr.Tool: 1.1
$ jfr help
Tool for working with Flight Recorder files.
Can read version 1.x to 2.x.
$ jfr version
1.0
This only give information on the actual tool's version, and it has stayed 1.0 for the longest. When trying to read a JFR recording of an unsupported version, i.e. 0.9, the command responds with:
$ jfr summary old-recording.jfr
File version 0.9. Only Flight Recorder files of version 1.x and 2.x can be read by this JDK.
It would be good to be able to query the underlying JDK for more information, f.i., the version of the JFR file recording produced, the JFR API version, and other relevant info.
--------------------
Proposed enhancement
--------------------
Add arguments to the version command, and more help text:
jfr version [--tool] (default)
[--recording-file-format]
[--all]
[--file <file>]
--tool
Display version of the jfr tool.
--recording-file-format
Print recording file (.jfr) version this JDK produces.
--file <file>
Print version of supplied JFR recording file.
--all
Print all relevant version info
--------------
Example output
--------------
$ jfr version
1.1
$ jfr version --tool
1.1
$ jfr version --recording-file-format
2.1
$ jfr version --file old-recording.jfr
0.9 (cannot be read by this tool)
$ jfr version --all
jdk.jfr.Recording: 2.1
jdk.jfr.Tool: 1.1
$ jfr help
Tool for working with Flight Recorder files.
Can read version 1.x to 2.x.
- relates to
-
JDK-8296923 JFR: jfr --version should return System.getProperty("java version")
-
- Resolved
-