Search code examples
javajvmjvm-argumentsjvm-hotspotjmc

java flight recorder how to dump on exception, FlightRecordingDumpOnUnhandledException


java version 1.7.0_79 Java(TM) SE Runtime Environment (build 1.7.0_79-b15) Java HotSpot(TM) 64-Bit Server VM (build 24.79-b02, mixed mode)

args i use

-XX:+UnlockCommercialFeatures 
-XX:+FlightRecorder  
-XX:+FlightRecordingDumpOnUnhandledException -XX:StartFlightRecording=duration=6m,filename=member.jfr"
-XX:FlightRecorderOptions=loglevel=debug,delay=2m,maxsize=2g"

error

Unrecognized VM option 'FlightRecordingDumpOnUnhandledException'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

what is the correct option to use ? to dump the recording on exception


Solution

  • -XX:+FlightRecordingDumpOnUnhandledException only works for JRockit. No similar option exists for Hotspot (JDK7/8)