stackpulse
stackpulse records what a Linux process is doing over time by taking regular
stack samples and saving them to a compact file. You can read that file later
and turn the raw frames into function names, source locations where available,
and a shape that is easier to display in a profiler UI.
The library requires Linux 6.0 or newer. It is not a command-line tool.
The Idea
Attach to a process, sample it while it runs, then read the saved profile back. The profile can include regular application code, Python frames, child processes, and kernel frames when the machine allows them.
In practice the flow is:
- Start or attach to a process.
- Record samples into a profile file.
- Read the file back.
- Convert the recorded frames into readable names.
- Build your own report, flame graph, UI, or export format on top.
Example
Record briefly, then read back one stack:
use ;
use ;
For the API reference, build the Rust docs with make doc.
Development
The Makefile is intentionally plain. No banners, no wrapper scripts.
If the coverage helper is missing, make coverage prints the install command.
You can pass extra cargo flags through CARGO_FLAGS:
Feature flags
debuginfod enables debuginfod lookup in the default native symbolizer when
DEBUGINFOD_URLS is set. STACKPULSE_DEBUG_DIRS overrides local debug-file
search roots, and STACKPULSE_DEBUGINFOD_CACHE_DIR overrides the debuginfod
cache directory.
Notes
Most application recordings work without special setup. Kernel frames, very high sample rates, or stricter system settings may need extra permissions.
License
Licensed under the MIT license.