- System requirements
- Profiler architecture
- Running the profiler
- Profiler activation
- Start profiling
- Solving performance problems
- CPU profiling
- CPU usage estimation
- Sampling
- Asynchronous sampling
- Tracing
- Call counting
- CPU tab
- What-if: an ability to ignore particular methods or focus on particular methods only
- Comparing performance snapshots
- Sampling settings
- Tracing settings
- Threads
- Deadlock detector
- Memory profiling
- Garbage collection
- Monitor profiling
- Exception profiling
- Probes: monitor events of various kinds
- Performance Charts
- Inspections: automatic recognition of typical problems
- Automatically trigger actions on event
- Summary, snapshot annotation, automatic deobfuscation
- Time measurement (CPU time, wall time)
- Filters
- Snapshot directory customization
- Export of profiling results to HTML, CSV, XML, plain text
- Profiler Java API
- Profiler HTTP API
- Command line tool to control profiling
- Settings
- FAQ: How to profile in my scenario?
CPU profiling
When the profiler is connected to the profiled application, the toolbar contains the following CPU profiling controls:
Toolbar Button | Description |
![]() |
Capture performance snapshot and save the profiling results to a file for comprehensive analysis. |
![]() ![]() |
Start/Stop CPU profiling. |
![]() |
Reset recorded CPU profiling results and continue CPU profiling. |
CPU profiling modes
You can choose either of four available measurement modes:
Start CPU profiling
You can start and stop CPU profiling during the execution of your application as many times as you want. When CPU profiling is not running, the profiler adds no performance overhead to application being profiled.
Profiler UI
- Connect to the application.
- Choose the profiling mode.
- Click the button to start profiling as shown on the picture:

Startup options
It may be useful to launch the application with CPU profiling right from the start. Learn more about profiler agent startup options.
Command line tool
Command line tool is designed to control profiling modes in headless environments.
Profiler API
API class com.yourkit.api.controller.Controller
for each profiling mode has a corresponding method
to start CPU profiling. For example:
Controller controller = new Controller();
controller.startSampling(null);
Triggers
Profiler built-in triggers allow to start CPU profiling on high CPU usage, by timer, on entering particular method, or by other conditions.
Live results
When CPU profiling is started, the results are immediately available in Call tree - All threads merged, Call tree - By thread, Flame graph and Method list sections on CPU tab.
In case of CPU tracing, both method times and invocation counts are shown. In case of CPU sampling, only times are shown.

The live view provides only basic information. To perform comprehensive analysis, capture performance snapshot, open it and use the full featured CPU tab.
Finish measuring and get the results
When the task you intended to profile has finished (or has performed for a sufficient amount of time), capture a performance snapshot with all the recorded information.

When this is done from the profiler UI, you can open the results for immediate analysis.
Further topics in this section describe the profiler's UI for analyzing CPU profiling results.