Skip to content

Fix fast_path_counters test: measure dealloc delta from before snapshot - #66

Merged
jayakasadev merged 1 commit into
mainfrom
fix/fast_path_counters-dealloc-window
Jun 12, 2026
Merged

Fix fast_path_counters test: measure dealloc delta from before snapshot#66
jayakasadev merged 1 commit into
mainfrom
fix/fast_path_counters-dealloc-window

Conversation

@jayakasadev

Copy link
Copy Markdown
Owner

Summary

  • Phase 11.9 moved fast_path_deallocs counter increments off the per-dealloc fast path and into a pre-credit at small_refill (alloc time). The C++ fast_path_counters test still measured after_alloc → after_dealloc, capturing zero rise.
  • Switch dealloc-side measurement to after_dealloc - before (cumulative window), matching the same fix already applied to snmalloc-rs/tests/frontend_stats.rs in 11.9.

Test plan

Full local sweep (CI is out of minutes):

  • ctest -E "long|stress" → 104/104 pass
  • cargo test --release (no features) → green
  • cargo test --features stats-basic → green
  • cargo test --features stats-full → green
  • cargo test --features profiling → green
  • cargo test --workspace → green (incl. snmalloc-tools)

Phase 11.9 moved fast_path_deallocs counter updates from the
per-dealloc hot path to a pre-credit at small_refill (alloc time).
The test's snapshot window `after_alloc -> after_dealloc` therefore
captured zero rise even though the counter had already been
credited the matching ~1024 deallocs during the alloc phase.

Switch the dealloc-side measurement to `after_dealloc - before`,
matching the same fix the Rust frontend_stats test received in
Phase 11.9.  C++ test logic was missed at the time.

Verified locally:
  - ctest -E "long|stress": 104/104 pass
  - cargo test --features stats-basic / stats-full / profiling: green
  - cargo test --workspace: green
@jayakasadev
jayakasadev merged commit 5b54dcd into main Jun 12, 2026
17 of 211 checks passed
@jayakasadev
jayakasadev deleted the fix/fast_path_counters-dealloc-window branch June 12, 2026 19:47
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.

1 participant