Skip to content

Add per-phase heap profiler#475

Closed
gabrielbosio wants to merge 8 commits into
mainfrom
feat/heap-profiling
Closed

Add per-phase heap profiler#475
gabrielbosio wants to merge 8 commits into
mainfrom
feat/heap-profiling

Conversation

@gabrielbosio

Copy link
Copy Markdown
Collaborator

Adds heap profiling infrastructure behind the existing instruments + jemalloc-stats feature flags.

  • scripts/bench_heap_profile.sh runs the prover across program sizes and prints a per-phase heap breakdown with growth rates and extrapolation
  • stark::instruments gains set_heap_reader, snap, HeapSnapshot, ProveHeapProfile for phase-boundary heap readings
  • prover::instruments::print_report prints a === HEAP PROFILE (MB) === table when a heap reader is registered

Usage: scripts/bench_heap_profile.sh --programs "1M 2M 4M 8M"

Comment thread scripts/bench_heap_profile.sh Outdated
Comment thread scripts/bench_heap_profile.sh Outdated
Comment thread crypto/stark/src/instruments.rs
@yetanotherco yetanotherco deleted a comment from github-actions Bot Apr 1, 2026
@yetanotherco yetanotherco deleted a comment from claude Bot Apr 1, 2026
@gabrielbosio

Copy link
Copy Markdown
Collaborator Author

/bench

@github-actions

github-actions Bot commented Apr 6, 2026

Copy link
Copy Markdown

Benchmark — fib_iterative_8M (median of 3)

Table parallelism: 32 (auto = cores / 3)

Metric main PR Δ
Peak heap 250570 MB 250314 MB -256 MB (-0.1%) ⚪
Prove time 81.704s 82.235s +0.531s (+0.6%) ⚪

✅ No significant change.

✅ Low variance (time: 0.8%, heap: 0.3%)

Commit: 0ff1b1b · Baseline: cached · Runner: self-hosted bench

@gabrielbosio gabrielbosio changed the title Add per-phase heap profiling Add per-phase heap profiler Apr 13, 2026
@gabrielbosio gabrielbosio mentioned this pull request Apr 14, 2026
@gabrielbosio

Copy link
Copy Markdown
Collaborator Author

Superseded by #507

@gabrielbosio
gabrielbosio deleted the feat/heap-profiling branch April 20, 2026 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants