feat(allocator): record byte size of arena chunk allocations#24554
feat(allocator): record byte size of arena chunk allocations#24554Boshen wants to merge 1 commit into
Conversation
Merging this PR will not alter performance
Comparing Footnotes
|
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
6caed9b to
510c435
Compare
87cc31d to
05eda40
Compare
The `track_allocations` tracking already counts how many chunks arenas request from the system allocator (so `tasks/track_memory_allocations` can exclude them from its system-allocator counts, which chunk requests would otherwise make platform-dependent — see #22621). Record the total byte size of those chunks too, and extend the accessor to `Allocator::global_chunk_allocation_stats() -> (count, bytes)`, matching the `get_allocation_stats()` shape. No snapshot changes. This enables the next commit to exclude chunk bytes from a new total-heap-allocated-bytes metric, the same way chunk counts are excluded from `sys allocs` today. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
05eda40 to
f0a9bb7
Compare

Second of three PRs splitting the byte-metrics work (stacked on the arena-size PR); no snapshot changes.
The
track_allocationstracking already counts how many chunks arenas request from the system allocator, sotasks/track_memory_allocationscan exclude them from its system-allocator counts — chunk requests would otherwise make the counts platform-dependent (see #22621). This records the total byte size of those chunks too, and extends the accessor toAllocator::global_chunk_allocation_stats() -> (count, bytes), matching the existingget_allocation_stats()shape.This enables the next PR to exclude chunk bytes from a new total-heap-allocated-bytes metric, the same way chunk counts are excluded from
sys allocstoday.🤖 Generated with Claude Code