fix(gc): report actual restore coverage inputs and slot work - #10237
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; 5 remain after this review. 📝 WalkthroughWalkthroughThe GC restore-coverage diagnostic now reports the snapshot inputs and slot-level traversal counters. The repair walk returns whether slots require tracking. New subprocess tests verify enabled, disabled, and repeated-repair behavior. ChangesRestore coverage diagnostics
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix · Severity of issue fixed: Medium Sequence Diagram(s)sequenceDiagram
participant TestProcess
participant restore_surviving_dirty_coverage
participant GCRepairWalk
TestProcess->>restore_surviving_dirty_coverage: run with PERRY_GC_DIAG=0 or 1
restore_surviving_dirty_coverage->>GCRepairWalk: walk dirty pages, external entries, and covered objects
GCRepairWalk-->>restore_surviving_dirty_coverage: restore pages and collect counters
restore_surviving_dirty_coverage-->>TestProcess: emit diagnostics when enabled
Merge Risk: ⚪ Minimal · up to The diagnostics and their enabled and disabled paths are covered without an identified behavior regression, so the change is ready to merge. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 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 |
Fixes #9877.
The restore diagnostic can report three dirty pages while its old-arena walk visits only one:
dirty_pagesis the union of old and external pages. Report the actualdirty_old_pagesinput, rawexternal_entries, andcoveredskip-set size separately.Keep the existing candidate/skipped counts and add admitted parent visits, all enumerated slots (including weak targets and primitive values), and strong slots whose children still require tracking. Productivity counts edges, even when the corresponding page was already dirty;
pages_addedcontinues to measure newly restored entries. Parent counts are visits, not distinct objects.A const-generic diagnostics branch removes the new accounting from the diagnostics-off traversal. The existing child-tracking decision supplies the productive-slot result, so children are not decoded twice. Collection policy, slot traversal, and remembered-set repair stay the same. This fixes the diagnostic defect; it makes no performance claim based on the timing interpretation withdrawn in the issue's September 6 update.
Validation:
dirty_pages=3for one old page) and passes afterward. It verifies diagnostics on/off, duplicate stale external owners, covered parents, primitive/old/young slots, and repeated repair: two productive slots in both passes, but one newly dirty page followed by zero.perry-devbuild of the compiler, runtime/stdlib static wrappers, and net archive passes; both runtime archive timestamps postdate the edit.git diff --checkpass.pre-tag-check.sh --quickpasses every check except public benchmark evidence freshness. Its artifact, verifier, and all 66 relevant input paths are unchanged from based8bfa28a38; the freshness failure is inherited.No version bump.
Summary by CodeRabbit
Bug Fixes
[gc-restore-coverage]diagnostics to accurately report restore-coverage activity.Tests