feat(track-memory-allocations): add total heap allocated bytes#24543
feat(track-memory-allocations): add total heap allocated bytes#24543Boshen wants to merge 1 commit into
Conversation
|
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. |
1614ca0 to
440629a
Compare
Merging this PR will not alter performance
Comparing Footnotes
|
c2d05ea to
fa30393
Compare
|
@camchenry tried this before, but problem was that the numbers aren't consistent across runs. I narrowed down at least one source of the problem: #23728 (comment) As it happens, I was talking to Claude about this last week. The indeterminism is likely caused by Address Space Layout Randomization (ASLR). On Linux, you can disable ASLR with One way to tackle it cross-platform is to shim the system allocator. Reserve a large chunk of address space from system at a fixed address with |
|
Arena bytes should be consistent across platforms and runs for parser and semantic - I believe they're purely deterministic. But transformer introduces indeterminism, which also then affects minifier (since it has to run after transform). Not sure about formatter. Sys alloc bytes may not be stable on any component (even parser). |
00c509d to
31281d3
Compare
fa30393 to
69068b0
Compare
69068b0 to
6573f83
Compare
906b58c to
f83d4e0
Compare
05eda40 to
f0a9bb7
Compare
Adds a `sys alloc bytes` value to each per-file block in the allocation snapshots: total bytes requested from the system allocator during the stage. Each `realloc` counts its full new size. Arena chunk allocations are excluded using the byte totals from the previous commit, mirroring the existing exclusion of chunk counts from `sys allocs`. Byte-value lines record Linux x64 (CI) values, per the policy established for `arena size`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
f83d4e0 to
073e5a0
Compare

Third of three PRs splitting the byte-metrics work (stacked on the chunk-alloc-bytes PR).
Adds a
sys alloc bytesvalue to each per-file block: total bytes requested from the system allocator during the stage. Eachrealloccounts its full new size. Arena chunk allocations are excluded using the chunk byte totals from the previous PR, mirroring the existing exclusion of chunk counts fromsys allocs.Byte-value lines record Linux x64 (CI) values per the policy established in the arena-size PR; the cross-platform behavior is documented in the source next to the byte counter. The first CI run of the combined change confirmed only byte lines differ between platforms — counts are identical.
🤖 Generated with Claude Code