17 Flight Recorder Configurations

Flight Recorder configurations control the amount of data that is recorded.

Flight Recorder uses two preconfigured configurations, default.jfc and profile.jfc. These configurations have predefined settings for each event type. Both of these configurations are located in <java_home>/lib/jfr. By default, Flight Recorder uses the default.jfc configuration when you start a recording. The default.jfc configuration is recommended for continuous recordings. It gives a good balance between data and performance (typically, less than 1% overhead). The profile.jfc configuration records more events and is useful while profiling an application.

In most cases, the preconfigured configurations are sufficient. However, there might be a scenario while analyzing a recording that some events are disabled by default. To enable these events, create a custom configuration. Use JDK Mission Control to configure the event settings by using one of the existing configurations. Make a copy of an existing configuration and then modify it. Don't modify the default configurations. Specify which configuration to use with the settings command-line option when starting a recording. For example:

-XX:StartFlightRecording:filename=recording.jfr,dumponexit=true,settings=default.jfc

-XX:StartFlightRecording:filename=recording.jfr,dumponexit=true,settings=mysettings.jfc