Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
A

async-profiler

> 编程语言
Open source

Sampling CPU and HEAP profiler for Java featuring AsyncGetCallTrace + perf_events

9.1K stars0 likes2 views
WebsiteGitHub

About

Sampling CPU and HEAP profiler for Java featuring AsyncGetCallTrace + perf_events

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.5

  • Linux x64: async-profiler-4.5-linux-x64.tar.gz
  • Linux arm64: async-profiler-4.5-linux-arm64.tar.gz
  • macOS arm64/x64: async-profiler-4.5-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 <PID>

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 running async-profiler and their detailed troubleshooting, please refer here.

Issues· 54 open

View all issuesOpen on GitHub
  • #1811

    RecordingAPI JNI global reference prevents class loader unloading

    Updated Sep 25, 2026
  • #1764

    Method profiling with short --loop causes unbounded MetaSpace and class count growth over time

    bugUpdated Sep 20, 2026
  • #1807

    SIGSEGV crash in Dictionary::lookup when profiling with Pyroscope

    bugUpdated Sep 18, 2026
  • #1754

    Profiling multiple perf events within one command

    enhancementUpdated Sep 16, 2026
  • #1802

    Support recording pc offsets for native samples

    enhancementUpdated Sep 14, 2026
  • #1785

    CPU profiling event seemingly does not work

    Updated Aug 23, 2026
  • #1718

    Enhance thread rendering/filtering for heatmaps & flamegraphs generated by jfrconverter

    enhancementUpdated Apr 30, 2026
  • #1700

    Improve -e alloc --live to better highlight potential memory leaks

    enhancementUpdated Mar 18, 2026
  • #1692

    JFR compatibility testing

    enhancementtestUpdated Feb 24, 2026
  • #1691

    Virtual Thread Support

    enhancementUpdated Feb 19, 2026

> Tags

C++

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 29, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言