Skip to content

Commit 5def1d0

Browse files
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 throughout
1 parent 970c2e9 commit 5def1d0

6 files changed

Lines changed: 1525 additions & 1 deletion

File tree

.github/actions/rust-build/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ runs:
2727
- name: Build and test
2828
shell: bash
2929
env:
30-
RUSTFLAGS: "--cfg tokio_unstable"
30+
RUSTFLAGS: "--cfg tokio_unstable -C force-frame-pointers=yes"
3131
run: |
3232
if [ "${{ inputs.toolchain }}" = nightly ]; then
3333
rm -fv Cargo.lock

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)