stax

A live sampling profiler for macOS and Linux — flamegraphs, hot functions, and annotated disassembly, streaming while your program runs.

bash
# record a program (or attach to a running one with --pid)
stax record -- ./target/release/mybench

# from another shell — or to an AI agent — query the live run
stax wait --for-samples 10000     # block until data lands
stax top -n 10 --sort self        # hottest leaf functions
stax flame -d 6                   # on-CPU flamegraph, as a tree
stax annotate 'mycrate::hot_fn'   # per-instruction sample counts

stax is a live version of Instruments.app: on-CPU and off-CPU stacks as flamegraphs, top-N functions, per-thread breakdowns, and annotated disassembly — all queryable while the recording is still running, from a terminal, a browser, or an AI agent.

It started as a fork of not-perf with macOS bits borrowed from samply, and is now very much its own codebase. On macOS it uses the private kperf/kdebug frameworks, so it sees things samply can't — at the cost of a privileged helper daemon.

Choose your path

Why stax