-
-
Notifications
You must be signed in to change notification settings - Fork 161
fix(gc): keep transient side allocations out of the drained-bytes term (#10376) #10377
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
Closed
proggeramlug
wants to merge
4
commits into
PerryTS:main
from
proggeramlug:fix/10376-transient-side-bytes
Closed
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
bc487a7
fix(gc): keep transient side allocations out of the drained-bytes ter…
f9e8fc7
test(gc): pin that a transient side allocation leaves no drained debt
24e8421
docs(changelog): fragment for #10377
14c365f
tooling(gc): gate the transient release and re-pin the census window
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,3 @@ | ||
| ### Fixed | ||
|
|
||
| - A program that allocates and frees short-lived native scratch in a loop — any `RegExp` call does — no longer accumulates false collection pressure. A million-call `.test()` loop was paying three old-generation collection cycles, one of them a full that traced a 52 MB live heap to free 59 KB, costing 33% more instructions per call (#10376). |
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
Large diffs are not rendered by default.
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.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🤖 get_repo_knowledge executed:
get_repo_knowledge PerryTS/perry /tmp/coderabbit-repo-knowledge/perryts-perry-d4a878bc/learningsLength of output: 25100
🏁 Script executed:
Repository: PerryTS/perry
Length of output: 36278
🏁 Script executed:
Repository: PerryTS/perry
Length of output: 50369
🏁 Script executed:
Repository: PerryTS/perry
Length of output: 47458
🏁 Script executed:
Repository: PerryTS/perry
Length of output: 37505
🏁 Script executed:
Repository: PerryTS/perry
Length of output: 34359
🏁 Script executed:
Repository: PerryTS/perry
Length of output: 18524
🏁 Script executed:
Repository: PerryTS/perry
Length of output: 24348
🏁 Script executed:
Repository: PerryTS/perry
Length of output: 3533
Assert drained pressure after real regex cleanup.
transient_side_allocations_never_enter_the_drained_debtcalls the accounting hooks directly. It never constructsReservation,Buffer, orSpans. Replacing a caller'sgc_note_external_side_free_transientwithgc_note_external_side_freewould still lower live bytes, but it would also increaseGC_EXTERNAL_SIDE_DRAINED_SINCE_FULLand can recreate the old-reclaim-pressure regression. Existing regex tests check live-byte cleanup, so they can catch some wrong totals, but they do not check drained debt. Adddrained_before == drained_afterassertions around real direct replacement (Spans), ordinary replacement (Reservation), and large split/compile (Buffer) paths.🤖 Prompt for AI Agents