- System requirements
- Profiler architecture
- Profiler installation
- Uninstall profiler
- Running the profiler
- Profiler activation
- Welcome screen
- Start profiling
- Profiling overhead
- Snapshots
- Solving performance problems
- CPU profiling
- Thread profiling
- Virtual threads support
- Object allocation profiling
- Memory profiling
- Monitor profiling
- Exception profiling
- JFR (Java Flight Recorder)
- Telemetry
- Probes: monitor events of various kinds
- Inspections: automatic recognition of typical problems
- Automatically trigger actions on event
- Automatic deobfuscation
- Summary
- Filters
- Profiler command line
- Export of profiling results to external formats
- Profiler Java API
- Profiler HTTP API
- Settings
- Troubleshooting and FAQ
JFR (Java Flight Recorder)
Java Flight Recorder (JFR) is a built-in event recording and profiling framework integrated into the Java Virtual Machine. It provides a low-overhead mechanism for collecting detailed runtime information about Java applications and the JVM itself. JFR records events such as method sampling, object allocations, garbage collection, thread activity, synchronization, I/O operations, and system-level statistics, storing them in a binary recording file that can later be analyzed.
Starting with OpenJDK 8u262, JFR became available as part of OpenJDK without additional licensing. From Java 11 onward, both Oracle JDK and OpenJDK include JFR as a standard feature.
Controlling flight recording
Profiler UI
When the profiler is connected to the profiled application, the toolbar contains the following flight recording controls:
| Toolbar Button | Description |
|
Start/Stop flight recording. |
|
Capture JFR snapshot. |
Agent startup options
By default flight recording is not automatically starts with the profiler.
Flight recording can be adjusted with startup options
jfr=on,
jfr=off,
jfr_config_name,
jfr_max_size,
on_exit=jfr.
HTTP API
For users requiring remote control or automation within their profiling workflows, YourKit Java Profiler offers control over the flight recording through HTTP API endpoints. The documentation outlines startJfr, getJfrConfigs, resetJfr and stopJfr methods available for this purpose.
Java API
The YourKit Java Profiler also provides a
Java API
for deep integration with Java applications.
The com.yourkit.api.controller.v3.Controller
includes methods for starting,
stopping, resetting, and capturing flight recording.
JDK built-in tools
Start recording using startup JVM options:
java -XX:StartFlightRecording ...
Start recording on an already running JVM:
jcmd <pid> JFR.start
Recording data can be dumped to a file using the JFR dump command:
jcmd <pid> JFR.dump filename=recording.jfr