简体   繁体   中英

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

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

Use the template manager that is available in Mission Control.

Go to Windows -> Template Manager and import the template and check Heap Statistics and Allocation Profiling, export it. Done!

(I copy-pasted this text from similar question , @Kire wrote it as well)

Basically, you can just add exception-level=all to settings. I have no idea why Oracle don't have documentation for this parameters.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM