Skip to content

Commit ec3b691

Browse files
committed
feat(callgrind-utils): parse .out into a call graph with JSON and flamegraph output
New Rust crate (edition 2024) that reads a Callgrind .out profile and extracts call-graph topology (costs/addresses ignored), serializing to canonical index-ref JSON for stable cross-platform callgraph diffing and to folded/flamegraph stacks. Node identity is the {object,file,function} tuple so same-named statics stay distinct. Edges are emitted only on calls= lines; name compression across the three ID spaces, the cfl/cfi alias, inline fi/fe callee-context inheritance, and multi-part merge are handled. A redaction pass strips volatile addresses/paths so snapshots stay portable. Fixtures are compiled and profiled by the in-repo Callgrind through an rstest harness (vg-in-place, --instr-atstart=no plus client requests keep loader/libc frames out): base graphs (recursion, chain, diamond, mutual), arm64 unwind fixtures (tail calls, recursion, TLS access, alloc/free cycles, longjmp, phantom recursion), the objskip seeding underflow regression, and the arm64 TLS-descriptor regression. Folded-stack snapshots and structural assertions; clippy and rustfmt clean.
1 parent 3a7f657 commit ec3b691

70 files changed

Lines changed: 7019 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

callgrind-utils/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
target/
2+
*.svg

0 commit comments

Comments
 (0)