1

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

dmc
  • 401
  • 4
  • 14

2 Answers2

2

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

Kire Haglin
  • 6,569
  • 22
  • 27
  • any idea how to enable object statistics ? my latest settings are -XX:+UnlockCommercialFeatures -XX:+FlightRecorder -XX:StartFlightRecording=delay=2m,duration=30m,filename=member.jfr,settings=profile – dmc Aug 04 '15 at 19:24
  • all ready tried allocation-profiling-enabled=true,heap-statistics-enabled=true – dmc Aug 04 '15 at 19:26
1

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.

Community
  • 1
  • 1
Jimilian
  • 3,859
  • 30
  • 33
  • 1
    > I have no idea why Oracle don't have documentation for this parameters. / Because names of settings and how they behave will change. In the future there may be one event type for exceptions (instead of two), it may trigger when the exception is thrown (not when it is allocated) and you may be able to filter on a class name (not just turn the event on/off). The template manager in JMC hides the underlying complexity and allows JVM implementation to evolve gradually. When things are more stable, parameters will be documented. – Kire Haglin Jul 07 '16 at 14:38