JFR: 'jfr scrub' should overwrite output

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P3
    • 19
    • Affects Version/s: None
    • Component/s: hotspot
    • None
    • jfr
    • b23

      The 'jfr scrub' command allows user to filter recording files, for example:

      $ cd /recordings
      $ jfr scrub --include-events jdk.JVMInformation test.jfr
      Scrubbed recording file written to:
      /recordings/test-scrubbed.jfr

      But if repeated, for example with additional filters, it fails:

      $ jfr scrub --include-events jdk.JVMInformation,jdk.SystemProperty test.jfr
      jfr scrub: file 'test-scrubbed.jfr' already exists

      This inconvenient and it would be better to overwrite the file. This is the behavior of JFR.dump. In case of a scrubbed file, the original still exists, so any destroyed scrubbed file can easily be regenerated.

      There should still be a check so the output file is not the same as the input.

            Assignee:
            Erik Gahlin
            Reporter:
            Erik Gahlin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: