async-profiler is a free sampling profiler for Java that aims to keep overhead low while avoiding safepoint bias. It works with OpenJDK and other runtimes based on the HotSpot JVM, and its stack traces can include non-Java threads plus native and kernel frames. Profiling targets include CPU time, Java-heap and native-memory allocations, memory leaks, contended locks, and hardware or software performance counters. Documented modes include CPU, allocation, wall-clock, Java-method, and multiple-events profiling. Results can be exported as collapsed stacks, flame graphs, HTML tree views, or text; interactive Flame Graph output can be viewed in a browser. Maintained builds are provided for Linux and macOS on x64 and arm64. A Java API is available as a Maven dependency, and IntelliJ IDEA bundles the profiler in its Java Profiler settings. It can profile Java processes in Docker or LXC containers from inside the container or from the host system. Building requires make, GCC 7.5.0 or newer or Clang 7.0.0 or newer, static libstdc++, and JDK 11 or newer.
Who it is for
It suits Java developers who need to profile CPU, memory, locks, or performance counters, including Java processes in Docker or LXC. Developers can use the Java API or IntelliJ IDEA integration as well as the command-line profiler.
What is good
- Targets CPU, heap, native memory, locks, and counters.
- Includes native and kernel frames in stack traces.
- Exports flame graphs, HTML tree views, and text.
- Official builds cover Linux and macOS x64 and arm64.
- Can profile Docker or LXC processes from host or container.
What to know first
- Building requires make, a supported compiler, static libstdc++, and JDK 11+.
- Official maintained builds are listed for Linux and macOS only.
- Nightly binaries for previous commits are retained for 30 days.
Verdict
async-profiler covers several Java performance targets and provides multiple ways to inspect results. Check its build requirements if you plan to build it yourself rather than use an official build.
async-profiler plans and pricing
All plansCompared on profiling software
- Free plan
- Yes
- Profiling modes
- both
- Supported languages
- Java, C, C++
- CPU profiling
- Yes
- Memory profiling
- Yes
- Thread profiling
- Yes
- Deployment model
- self-hosted
