$ account async-profiler
async-profiler is a low-overhead sampling profiler for Java and native applications on Linux/macOS. It runs as a native JVM agent (libasyncProfiler.so/.dylib) loaded via -agentpath at JVM startup, or attached to a running JVM through its own C++ launcher `asprof` using an embedded jattach implementation. The core engine (src/profiler.cpp) orchestrates multiple sampling engines — perf_event_open-based CPU sampling, POSIX interval timers, wall-clock thread sampling, JVMTI allocation hooks with int3 breakpoint traps, and malloc/lock interception — then walks Java and native stacks using frame-pointer, DWARF, and HotSpot VMStructs-based unwinders. Sampled call traces are deduplicated in a lock-free CallTraceStorage and emitted as Java Flight Recorder (JFR) files, interactive HTML flame graphs, collapsed stacks, OpenTelemetry (OTLP) protobuf, pprof, or heatmaps. Architecturally this is a native library + CLI tool + standalone Java converter, not a service. The agent entry points are in src/vmEntry.cpp (JVMTI: Agent_OnLoad, Agent_OnAttach), the CLI in src/main/main.cpp, and the programmatic API in src/api/one/profiler/AsyncProfiler.java with a companion JMX MBean. A separate Java application (src/converter) parses JFR output — JfrReader.java is a full binary JFR parser — and transforms it into flame graphs, differential visualizations, heatmaps (using a custom LZ78-like tree plus Huffman encoding), and OTLP profiles. The codebase depends deeply on Linux kernel facilities (perf_event_open, /proc, signals) and on HotSpot internals such as AsyncGetCallTrace and hand-maintained VMStructs offset tables; the latter is the primary source of cross-JDK maintenance risk. Although the dominant character is a profiling tool/agent, the JFR converter and heatmap/flamegraph generators give the repo an analytical data-processing flavor that is embedded in the tool's output pipeline rather than a separate research workflow. Strengths: exceptional systems craftsmanship throughout — signal-safe memory allocation via raw syscalls, lock-free append-only dictionaries and linear allocators, a standalone Rust symbol demangler, a from-scratch protobuf wire-format writer, architecture-specific stack unwinders, and a self-contained test harness that spawns real JVMs. The project is actively maintained, runs integration tests across JDK 8–25 and multiple distributions in CI, and publishes nightly releases. Weaknesses are inherent to the domain: fragile hand-maintained JVM internals, heavy platform #ifdef sprawl across x64/aarch64/arm/ppc64/riscv64/loongarch64, some commented-out tests pending tiered CI re-enablement, and experimental features (OTLP output, --all multi-event mode) explicitly flagged unstable.