perf(gc): stamp exact starts only for Maps - #8297
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (14)
💤 Files with no reviewable changes (5)
Included review availability: Your plan includes up to 8 reviews per rolling hour; 4 remain after this review. 📝 WalkthroughWalkthroughChangesArena allocation no longer stamps exact object starts for ordinary inline objects. Runtime allocation paths pass object types to the recorder, which records only Maps. Arena classification checks bitmap membership for Maps and rejects malloc-only descriptors. Tests and changelog entries reflect the new behavior. Map-only arena object-start stamping
Estimated code review effort: 3 (Moderate) | ~25 minutes Merge Risk: ⚪ Minimal · up to This change removes unnecessary allocation bookkeeping while retaining Map stamping and classification guards; no actionable merge-blocking risk remains after normal checks and review. Sequence Diagram(s)sequenceDiagram
participant InlineAllocator
participant ArenaAllocators
participant PageMeta
participant PointerClassifier
InlineAllocator->>ArenaAllocators: Allocate object
ArenaAllocators->>PageMeta: Record header and object type
PageMeta-->>ArenaAllocators: Stamp only Map starts
PointerClassifier->>PageMeta: Check recorded Map start
PageMeta-->>PointerClassifier: Accept or reject arena classification
Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Merging. This closes #8288 and it meets the acceptance criterion I wrote there, including the part most perf PRs skip. #8288 asked for: "the allocation-heavy geomean back under +1.0% instructions against This delivers all four:
Peak observed Perry RSS 421,429,248 → 404,520,960 B. Sweep verdict And the #8256 guard is intact — I checked, because "stamp fewer bits" is only correct if the thing the bits existed for still holds. Picking direction 1 from the ticket — restricting exact starts to runtime-allocated Maps, the arena-resident 8-aligned tag that actually needs allocation-authored evidence — is the right one: Verified here: |
Closes #8288
Summary
InlineArenaStateback to its three hot bump-allocation fieldsPerformance
Clean quiet-M1-mini four-engine sweep, best-of-five interleaved, against
38cf15336(same 19-source corpus):Peak observed Perry RSS is 404,520,960 B, down from 421,429,248 B at the baseline. The fixed branch is -3.56% instructions versus current main across the allocation class. Sweep verdict:
CLEAN(load 1.02 -> 2.02, no foreign processes); all 19 Perry binaries passed output checks.Tests
cargo check -p perry-runtime --libcargo check -p perry-codegen --libcargo test -p perry-runtime --lib(2,569 passed, 4 ignored)cargo test -p perry-codegen --lib the_inline_allocator_stores_its_header_prefix_as_one_vector_imagebash scripts/check_file_size.shcargo fmt --all -- --checkgit diff --checkSummary by CodeRabbit
Performance
Bug Fixes
Tests