RFR: 8351266: JFR: -XX:StartFlightRecording:report-on-exit [v3]

Markus Grönlund mgronlun at openjdk.org
Thu Mar 13 13:42:22 UTC 2025


On Thu, 13 Mar 2025 13:39:38 GMT, Erik Gahlin <egahlin at openjdk.org> wrote:

>> Could I have a review of an enhancement that prints 'jfr view' when the JVM exits? The purpose is to simplify usage and avoid the need to dump to a file.
>> 
>> For more details, see the [CSR](https://bugs.openjdk.org/browse/JDK-8351370) 
>> 
>> Example usage:
>> 
>>     $ java -XX:StartFlightRecording:report-on-exit=hot-methods ...
>>     [0.166s][info][jfr,startup] Started recording 1. No limit specified, using maxsize=250MB as default.
>>     [0.166s][info][jfr,startup] 
>>     [0.166s][info][jfr,startup] Use jcmd 66977 JFR.dump name=1 filename=FILEPATH to copy recording data to file.
>>     
>>                                               Java Methods that Executes the Most
>>     
>>     Method                                                                                                  Samples Percent
>>     ------------------------------------------------------------------------------------------------------- ------- -------
>>     sun.java2d.marlin.Renderer._endRendering(int, int)                                                          120  33.99%
>>     sun.java2d.marlin.MarlinTileGenerator.getAlphaRLE(byte[], int, int)                                          22   6.23%
>>     sun.awt.image.PNGImageDecoder.produceImage()                                                                 19   5.38%
>>     sun.java2d.marlin.MarlinCache.copyAARowRLE_WithBlockFlags(int[], int[], int, int, int)                       14   3.97%
>>     sun.java2d.marlin.MarlinTileGenerator.getAlphaNoRLE(byte[], int, int)                                         7   1.98%
>>     sun.java2d.marlin.Renderer.copyAARow(int[], int, int, int, boolean)                                           7   1.98%
>>     sun.awt.image.PNGImageDecoder.filterRow(byte[], byte[], int, int, int)                                        7   1.98%
>>     sun.java2d.marlin.MarlinCache.copyAARowNoRLE(int[], int, int, int)                                            5   1.42%
>>     sun.java2d.pipe.BufferedContext.validate(...)                                                                 5   1.42%
>>     java.awt.GradientPaintContext.clipFillRaster(int[], int, int, int, int, double, double, double)               3   0.85%
>> 
>> Testing: jdk/jdk/jfr
>
> Erik Gahlin has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Fix whitespace

Very convenient feature, Erik! Well done.

-------------

Marked as reviewed by mgronlun (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/23958#pullrequestreview-2681938062


More information about the hotspot-jfr-dev mailing list