Commit 5def1d0
authored
Memory profiling design (#362)
* Memory profiling design
* Fix CI: add frame pointers to RUSTFLAGS, support aarch64 in unwind bench
The RUSTFLAGS env var in the CI composite action overrides
.cargo/config.toml, which includes -C force-frame-pointers=yes.
Add it to the CI RUSTFLAGS explicitly.
Also replace the crate-level #![cfg(x86_64)] with per-item cfg gates
and add aarch64 inline asm so the benchmark runs on ARM CI too.
* Address CR feedback on memory profiling design
Key changes:
- Replace DashMap with crossbeam-skiplist::SkipMap for liveset (lock-free,
eliminates deadlock risk inside allocator hook)
- Fix realloc bug: on_dealloc now called after realloc succeeds, not before
- Use RAII ReentrancyGuard struct that clears on drop (panic-safe)
- Split goals: "install-once" and "instruments all threads" are separate
- Add non-goals: memory contents inspection, cryptographic randomness
- Add evolution path for mmap tracking
- Add viewer/analysis as explicit goal
- Contextualize overhead with typical allocator latencies (20-80ns)
- Fix CPU calculation: 0.06-0.1% of one core, not "well under 1ms/sec"
- Add shuttle concurrency testing to test strategy
- MUSL: conditionally compile out if untested rather than shipping untested
- MAX_FRAME_SIZE: explain safety tradeoff, plan to raise with validation
- Clean up conversational language throughout1 parent 970c2e9 commit 5def1d0
6 files changed
Lines changed: 1525 additions & 1 deletion
File tree
- .github/actions/rust-build
- dial9-tokio-telemetry/design
- perf-self-profile
- benches
- src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments