Getting started
Step-by-step guide to getting started with JDK Flight Recorder (JFR), including prerequisites, setting up JFR, and starting a recording.
Getting started with JFR
To get started with JFR, follow these steps:
-
Prerequisites: Check that your Semeru version supports JFR. For more information about the support matrix, see Introduction.
-
Set up JFR: Make sure that the
$JAVA_HOME/bindirectory is included in the system's PATH. For more information, see Setup and configuration.- On z/OS, explicitly enable the attach API by using the option
-Dcom.ibm.tools.attach.enable=yeson the target JVM for jcmd to discover and connect to it.
- On z/OS, explicitly enable the attach API by using the option
-
Start a recording: Use the jcmd command to start a JFR recording. You can specify the recording duration, output file and other options as needed. For more information, see Data collection.
-
View and analyze the recording: After the recording is complete, you can view and analyze the data by using a tool such as JDK Mission Control (JMC) or by using JFR commands. For more information, see Data visualization and Data analysis.
By following these steps, you can get started with using JFR to profile and troubleshoot your Java applications.