If a user has specified -XX:+ExitOnOutOfMemoryError, Flight Recorder doesn't dump a recording.
It is difficult to use the normal mechanism and write the recording in the shutdown hook, since there is no more Java memory. Furthermore, a user may want the JVM to exit as fast as possible to minimize the risk of data corruption. Also, the Epsilon GC sets ExitOnOutOfMemoryError and a user may not want recording on their hard disk everytime the JVM exits.
It is probably wise to only dump a recording if a user has specified XX:StartFlightRecording:dumponexit=true (which is implicitly set by -XX:StartFlightRecording:filename=<filename>). This in contrast to a crash, where a emergency dump is written regardless if a user has specified dumponexit=true or not.
If a recording is dumped, Old Object sample events should be written, so a user have information to solve any potential Java memory leak
It is difficult to use the normal mechanism and write the recording in the shutdown hook, since there is no more Java memory. Furthermore, a user may want the JVM to exit as fast as possible to minimize the risk of data corruption. Also, the Epsilon GC sets ExitOnOutOfMemoryError and a user may not want recording on their hard disk everytime the JVM exits.
It is probably wise to only dump a recording if a user has specified XX:StartFlightRecording:dumponexit=true (which is implicitly set by -XX:StartFlightRecording:filename=<filename>). This in contrast to a crash, where a emergency dump is written regardless if a user has specified dumponexit=true or not.
If a recording is dumped, Old Object sample events should be written, so a user have information to solve any potential Java memory leak
- duplicates
-
JDK-8196050 Remove -XX:FlightRecorder=dumppath=
-
- Open
-
- relates to
-
JDK-8364090 Dump JFR recording on CrashOnOutOfMemoryError
-
- Resolved
-