Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8298533

JFR tool: print more version information

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P5 P5
    • None
    • None
    • hotspot
    • None
    • jfr

      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.

            Unassigned Unassigned
            jnordstrom Joakim Nordström
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: