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

JFR: -XX:StartFlightRecording:report-on-exit

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P3 P3
    • 25
    • None
    • hotspot
    • None
    • jfr
    • master

      Typical JFR command-line usage is:

      $ java -XX:StartFlightRecording:filename=recording.jfr ...
      $ jfr view hot-methods recording.jfr

      It would be convenient if they could be combined, so when the application exits, the hot-methods view is displayed.

      $ java -XX:StartFlightRecording:report-on-exit=hot-methods ...

                                                Java Methods that Executes the Most

      Method Samples Percent
      ------------------------------------------------------------------------------------------------------- ------- -------
      sun.java2d.marlin.Renderer._endRendering(int, int) 6 35.29%
      sun.java2d.marlin.MarlinCache.copyAARowRLE_WithBlockFlags(int[], int[], int, int, int) 2 11.76%
      sun.java2d.pipe.PixelToParallelogramConverter.fill(SunGraphics2D, Shape) 1 5.88%
      java.nio.Buffer$2.reserveMemory(long, long) 1 5.88%
      javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(...) 1 5.88%
      sun.java2d.pipe.BufferedContext.validate(...) 1 5.88%
      sun.java2d.marlin.Renderer.curveBreakIntoLinesAndAdd(double, double, Curve, double, double) 1 5.88%
      sun.lwawt.LWWindowPeer.notifyMouseEvent(int, long, int, int, int, int, int, int, int, boolean, byte[]) 1 5.88%
      java.awt.Container.decreaseComponentCount(Component) 1 5.88%
      sun.java2d.marlin.MarlinCache.touchTile(int, int, int, int, int[]) 1 5.88%
      java.util.concurrent.locks.AbstractQueuedSynchronizer.release(int) 1 5.88%
      e

      This simplifies usage, as users don't need to name a recording file, delete it or issue a separate view command. Multiple reports could be separated with semicolons.

      $ java -XX:StartFlightRecording:report=hot-methods,gc-pauses ...

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

              Created:
              Updated:
              Resolved: