[codex] Prioritize old reclaim at parse boundaries#5380
Merged
proggeramlug merged 1 commit intoJun 18, 2026
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
984d47c to
b9b4d16
Compare
554e382 to
2d83365
Compare
7169ab7
into
codex/perry-gc-performance-cycle-20260618-40
11 of 14 checks passed
proggeramlug
pushed a commit
that referenced
this pull request
Jun 18, 2026
* Collect parse-boundary GC pressure * Prioritize old reclaim at parse boundaries (#5380)
proggeramlug
pushed a commit
that referenced
this pull request
Jun 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
old_gen_bytesreclaim runs, and confirms a rooted old object survives.Root Cause
bench_json_roundtripwas repeatedly entering parse-boundary copied-minor collections even after lazy JSON/tape churn had moved pressure into old/large-excluded storage. Those minor collections could not reclaim the dead old-gen pressure, so Perry spent time copying/promoting young objects while RSS kept growing.Evidence
Targeted trace, same worktree before/after this commit,
PERRY_GC_TRACE=1:json_roundtrip:327json_roundtrip:805373555053735550245588 KB134528 KB0:00.390:00.1436 minor2 full36 arena_bytes2 old_gen_bytes173554 us31229 us28927 us16222 us8163689482092010514712035023760Full suite one-run after this change, with absolute JSON output path:
PERRY_BIN="$PWD/target/release/perry" benchmarks/compare.sh --full --runs 1 --json-out "$PWD/tmp/cycle41-profile/full-after.json" --warn-onlybench_json_roundtrip: 392ms / 236480KBto91ms / 134660KB.c89b3ad5; those are existing branch-vs-baseline differences from before this focused PR, not new rows introduced by this patch.Validation
cargo fmt -- --checkcargo test -p perry-runtime gc::tests::triggerscargo test -p perry-runtime gc::tests::host_safepointscargo test -p perry-runtime gc::tests::budgeted_step_apicargo test -p perry-runtime json::cargo build --release -p perrybench_json_roundtrip.tswith./target/release/perry compile --no-cache ...and ran the traced benchmark above.