javajfradoptopenjdk

Java Flight Recorder comprehensive list of VM options for OpenJDK 8 & OpenJDK 11


Is there a way to get a comprehensive list of VM options for Java Flight Recorder (JFR). I am particularly interested in OpenJdk 8 & OpenJdk 11

so far I find this list quite usefull https://chriswhocodes.com/hotspot_options_jdk8.html

also

java -XX:+UnlockDiagnosticVMOptions -XX:+PrintFlagsFinal -version

Is there any resource that would provide list of options available for JFR?


Solution

  • In JDK 23 and later, you can do:

    $ java -XX:StartFlightRecording:help 
    

    For older releases, I think the most comprehensive and up-to-date description of the VM option for JFR can be found in the documentation of jcmd JFR.start and JFR.configure

    https://docs.oracle.com/en/java/javase/15/docs/specs/man/jcmd.html

    -XX:StartFlightRecording:

    -XX:FlightRecorderOptions:

    Besides repositorypath, memorysize and perhaps stackdepth, I would not change any of the below options. They are legacy or there for JVM support engineers to provide workarounds. Using non-default values will increase the risk of crashes or performance related problem.