-
-
Notifications
You must be signed in to change notification settings - Fork 159
fix(gc): restore safe old-page relocation #7913
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| ### Fixed | ||
|
|
||
| - Restored safe old-generation page defragmentation and enabled it by default. | ||
| A minor trace does not prove unmarked old objects dead, so evacuation now | ||
| snapshots every indexed occupant of a selected source block, rejects the | ||
| block before forwarding if any occupant cannot move, and otherwise relocates | ||
| the complete block before reclaiming it. `PERRY_GC_OLD_DEFRAG=0` remains an | ||
| explicit diagnosis and rollback switch. | ||
|
|
||
| - Closed three runtime rewrite gaps: JSON's parse-key ring and the perf entry | ||
| keys cache now follow their structurally rooted owners, while diagnostics | ||
| symbol-keyed state is rekeyed after a move. Cached `@perry_class_keys_*` | ||
| copies are precise function-lifetime mutable roots rather than relying on the | ||
| old generation being immovable. The runtime-holder inventory now fails on | ||
| known or unevaluated movable-address gaps. | ||
|
|
||
| The historical corruption workload fails on rebuilt main when old-page | ||
| relocation is enabled, but passed six consecutive verified runs after this | ||
| change with output identical to the clean control. A mixed-size regression | ||
| also demonstrates that a fragmented source block is actually released. | ||
|
|
||
| ### Performance | ||
|
|
||
| Old-page metadata selection now runs only after the copying-minor fast path has | ||
| declined the collection. This removed an O(old pages) charge from ordinary | ||
| copying minors: the worst affected retention benchmark moved from +8.29% in the | ||
| initial implementation to +0.14% best / -0.09% median in the final quiet-M1 | ||
| best-of-15 comparison. | ||
|
|
||
| Precise class-key roots cost 3.70-4.45% in four tight shape/class allocation | ||
| kernels. That is the remaining correctness tradeoff; `interp` improves 2.85%, | ||
| and the other 20 programs remain within +/-1.5%. |
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
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy lift
🧩 Analysis chain
🏁 Script executed:
Repository: PerryTS/perry
Length of output: 50372
🏁 Script executed:
Repository: PerryTS/perry
Length of output: 50372
🏁 Script executed:
Repository: PerryTS/perry
Length of output: 50372
🏁 Script executed:
Repository: PerryTS/perry
Length of output: 50370
🏁 Script executed:
Repository: PerryTS/perry
Length of output: 50370
🏁 Script executed:
Repository: PerryTS/perry
Length of output: 50370
🏁 Script executed:
Repository: PerryTS/perry
Length of output: 19762
🏁 Script executed:
Repository: PerryTS/perry
Length of output: 50370
Provide a precise root when
reserve_shadow_slot()returnsNone.With
PERRY_SHADOW_STACK=0and native roots inactive,reserve_shadow_slot()returnsNone. The defaultAutoscan mode skips the conservative stack scan, so moving collections can relocate the class-key object while the entry slot retains its old address.Reject this configuration or use a supported precise-root mechanism for the cache slot.
🤖 Prompt for AI Agents
Source: Coding guidelines