-
-
Notifications
You must be signed in to change notification settings - Fork 159
gc: make the below-HEAP_MIN growth-stub skip loud, and split from-space offenders by snapshot coverage #7043
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
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,15 @@ | ||
| Two GC diagnostics salvaged from the #7022 investigation. | ||
|
|
||
| **`js_array_grow`'s below-`HEAP_MIN` stub skip is no longer silent.** Whether a | ||
| growth forwarding stub gets installed depends on where the allocator placed the | ||
| array — an address-conditional behaviour change with no signal. It now fires a | ||
| `debug_assert` and a once-per-process stderr line. That silence already cost real | ||
| debugging time: an experiment that replaced arena blocks with `mmap`'d guard-paged | ||
| blocks used a NULL hint, landed below the platform floor, silently disabled every | ||
| growth stub, and came back falsely clean. | ||
|
|
||
| **The from-space scan reports snapshot coverage.** Offending slots are now split | ||
| into `not_in_snapshot` (the page was never in this cycle's dirty snapshot, so the | ||
| in-cycle remembered-set scan never looked at it) and `in_snapshot` (the scan | ||
| looked at the page and still did not rewrite the slot). That split is what | ||
| established #7022's failure as in-cycle rather than a dropped-then-restored edge. |
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.
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.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: PerryTS/perry
Length of output: 50370
🏁 Script executed:
Repository: PerryTS/perry
Length of output: 50369
🏁 Script executed:
Repository: PerryTS/perry
Length of output: 22281
Do not use
dirty_old_pagesas from-space scan coverage.dirty_old_pagesonly covers old-page dirty headers; the from-space scan walks every surviving slot in the heap, including malloc tracked objects, so slots whose owner is not on a dirty page can still be classified as not inspected from snapshot coverage. Build coverage from the actual scan path, or narrow this wording sonot_in_snapshotdoes not claim the slot was never examined.📍 Affects 2 files
crates/perry-runtime/src/gc/fromspace_scan.rs#L317-L319(this comment)changelog.d/7043-heap-min-diagnostic.md#L11-L15🤖 Prompt for AI Agents