![]() Previous |
![]() Next |
Like its aeronautic namesake, a black box recording provides an account of events leading up to a “catastrophic” failure of a system or application. Whenever a Java application running on HotSpot is started with the JFR enabled, data is constantly collected in the JFR or its buffers. In the event of system failure, the content of this recording can be dumped to a file and used for post-mortem analysis of what went wrong. Examples of such events include a JVM crash, unexpected application termination, or a power failure. The JFR GUI provides a mechanism for recovering and inspecting this data.
To create a black box recording:
Start the JVM wih the following JVM flags: -XX:+UnlockCommercialFeatures, -XX:+FlightRecorder, -XX:FlightRecorderOptions=defaultrecording=true.
In the Context Menu for the JVM, select Dump Default Recording.
The Dump Recording dialog box appears.
Use Browse if necessary to locate the filepath or if you want to overwrite an existing file.
Select the duration of the recording by clicking the appropriate radio button, as described in Table: Selecting the Duration of Black Box Data.
Selecting the Duration of Black Box Data
To dump... | Do this... |
---|---|
The entire recording |
Select Whole recording. |
The final nn minutes of the recording |
|
A selected time range |
|
Click OK.
The recording will be dumped to the specified file. You can then open this file in the JFR and inspect its data there.