fix(gc): trace large arrays by allocation bounds - #10223
proggeramlug wants to merge 2 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe collector now bounds array slot tracing by tracked physical allocation instead of a fixed 16-million-element cutoff. Regression tests cover large live prefixes, child marking, invalid capacities, sparse arrays, and consumed queue prefixes. ChangesLarge array GC tracing
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~12 minutes Change: Bug fix · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The large-array tracing fix has targeted regression coverage, and no concrete merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Linked Issues checkExplanation The implementation addresses the tracing cause in [ Resolution Complete and record automated acceptance coverage for [ Full details: Docstring CoverageExplanation Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 3 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
🧪 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 |
|
Coordination for the brief 3 runtime-handle performance session: working in perf/runtime-handle-scopes from 9fda98d, isolated worktree. Expected edits are gc/roots/runtime_handles.rs, tls_hot.rs, and focused runtime-root tests / custody inventories. I checked this PR’s file list: no overlap with header_gc_slots.rs or layout_trace tests, and I will keep the array tracing change out of this branch. Please flag any planned runtime-handle or hot-TLS edits. |
|
Flagging an overlap for the runtime-handle / hot-TLS session: #10244 (Android pthread-key pooling) edits This PR (#10223) itself is in merge train 186r, currently validating. |
Summary
Keep large arrays visible to the collector after backing-store growth.
gc_element_slot_rangenow checks capacity against the actual allocation size, preserving the allocated live prefix for marking and the shared mutable-slot visitor.Changes
Source history places the capacity-based regression in
70eaabe57628acbe04d285013ac06ad66a9f2862(#9434), which changed the tracing guard from live length to capacity. This attribution comes from source history, not an execution bisect.Related issue
Fixes #10215.
Test plan
./scripts/test_affected_crates.sh --base bb9aa5a641: 4,914 tests passed, zero failed (runtime: 3,771 passed / 4 ignored; compiler: 1,106 passed; FFI: 37 passed; updater/UI had no unit tests). Run single-threaded as required, with local target storage, debug info disabled, and incremental compilation disabled.BASE_SHA=bb9aa5a641 SKIP_COMPILE_GATES=1 ./scripts/run_lint_gates.sh: 76 of 77 executable script checks passed; the unchanged public benchmark artifact fails freshness. Two CI-only checks and the compile tier were not run by this command.The public benchmark freshness failure predates this patch: all fingerprint inputs and the artifact are byte-identical to base
bb9aa5a641. CI also reports an existing thread-local policy violation incrates/perry-runtime/src/regex/perex_owner.rs; that file and the policy inputs are unchanged by this PR. The CI warnings job also fails on the existing unusedregistered_extern_handleandwasm_memory_descriptor_maximumhelpers inobject/global_this_webassembly.rs(also present in the initial base build). Formatting passes on the final source.Local validation ran on macOS arm64. No release TypeScript churn matrix, execution bisect, or million-record Node checksum comparison is claimed.
Checklist
Summary by CodeRabbit
Bug Fixes
Tests