async-profiler /async-profiler
Sampling CPU and HEAP profiler for Java featuring AsyncGetCallTrace + perf_events
★ 9,193⑂ 996👁 163⑃ 696● 914▤ 40
+1
Daily
9,193
stars
996
forks
163
watchers
696
prs
914
issues
40
releases
README
Async-profiler This project is a low overhead sampling profiler for Java that does not suffer from the Safepoint bias problem. It features HotSpot-specific API to collect stack traces and to track memory allocations. The profiler works with OpenJDK and other Java runtimes based on the HotSpot JVM. Unlike traditional Java profilers, async-profiler monitors non-Java threads (e.g., GC and JIT compiler threads) and shows native and kernel frames in stack traces. What can be profiled: - CPU time - Allocations in Java Heap - Native memory allocations and leaks - Contended locks - Hardware and software performance counters like cache misses, page faults, context switches - and more. See our 3 hours playlist to learn about more features. Download Stable release: 4.6 - Linux x64: async-profiler-4.6-linux-x64.tar.gz - Linux arm64: async-profiler-4.6-linux-arm64.tar.gz - macOS arm64/x64: async-profiler-4.6-macos.zip - Profile converters: jfr-converter.jar Nightly builds The most recent binaries corresponding to the latest successful commit in master. For a build corresponding to one of the previous commits, go to Nightly Builds, click the desired build and scroll down to the artifacts section. These binaries are kept for 30 days. Quick start In a typical use case, profiling a Java application is just a matter of a running asprof with a PID of a running Java process. $ asprof -d 30 -f flamegraph.html The above command translates to: run profiler for 30 seconds and save results to flamegraph.html as an interactive Flame Graph that can be viewed in a browser. Find more details in the Getting started guide. Building Build status Minimum requirements - make - GCC 7.5.0+ or Clang 7.0.0+ - Static version of libstdc++ (e.g. on Amazon Linux 2023: yum install libstdc++-static) - JDK 11+ How to build Make sure gcc, g++ and java are available on the PATH. Navigate to the root directory with async-profiler sources and run make. async-profiler launcher will be available at build/bin/asprof. Other Makefile targets: - make test - run unit and integration tests; - make release - package async-profiler binaries as .tar.gz (Linux) or .zip (macOS). Supported platforms | | Officially maintained builds | Other available ports | | --------- | ---------------------------- | ----------------------------------------- | | Linux | x64, arm64 | x86, arm32, ppc64le, riscv64, loongarch64 | | macOS | x64, arm64 | | Documentation Basic usage - Getting Started - Profiler Options - Profiling Modes - Integrating async-profiler - Profiling In Container Profiler output - Output Formats - FlameGraph Interpretation - JFR Visualization - Converter Usage - Heatmap Advanced usage - CPU Sampling Engines - Stack Walking Modes - Advanced Stacktrace Features - Profiling Non-Java Applications Troubleshooting For known issues faced while runnin
Top issues
#726Application Startup Profiling13 comments · 2023-03-16#913Add Java-API as output option for wall-clock profiling12 comments · 2024-04-04#1275PARK_SAMPLE doesn't work with virtual threads10 comments · 2025-04-30#404Event streaming9 comments · 2021-03-24#1588PmuTests failing on Ubuntu 24, Corretto 25, x86_648 comments · 2025-11-13#1245async-profiler doesn't patch previously patched library in case of library reload8 comments · 2025-04-18#1313Support leak detection of customer memory pool7 comments · 2025-05-23#1813Tracepoint, kprobe and uprobe events record at most one sample per thread on Linux 6.17+6 comments · 2026-09-30
Discussions
#1827How to start async-profiler in a Rust application using a JVM-based libhdfs library?2 comments · 2026-10-23#1815Is there a way to track mmap allocation which lead to increasing in RSS1 comments · 2026-09-30#1808Native memory leak does not capture memory allocation info1 comments · 2026-09-17#1801[Info| guidance needed] Jafra — Kubernetes continuous profiling pipeline built on async-profiler (intent to contribute; seeking guidance)4 comments · 2026-09-10#1778SIGSEGV in SafeAccess::load crashes Zing — recovery handler not installed1 comments · 2026-07-31#1757Integrate JVMTI 'RequestStackTrace' and support native frames1 comments · 2026-06-18#1745What's new in async-profiler 4.4 🚀0 comments · 2026-05-17#1731Async-Profiler Native Memory Leak – Clarification Needed2 comments · 2026-04-18
Latest release
async-profiler 4.6 v4.6 2026-10-19What's new Features - 1775: Configurable rate limiter for JFR events - 1777: Filter wall samples by thread name instead of thread id - 1791: Send profiles directly to an OTel-compatible endpoint Improvements - 1780: Combine Flame Graph and Tree View in a single HTML - 1781: More accurate stack walking limit - 1782: Display actual value units in Flame Graph - 1784: Add service.name resource attribute to OTLP output - 1796: Support JFR event settings in jfrsync - 1798: Fingerprint-based detection of idle threads during wall clock profiling - 1800: Support tracking