Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
GH-126491: GC: Mark objects reachable from roots before doing cycle collection#126502
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
Uh oh!
There was an error while loading. Please reload this page.
Merged
Changes from all commits
Commits
Show all changes
35 commits Select commit Hold shift + click to select a range
2ec8d8a GC experiment: mark almost all reachable objects before doing collect…
markshannon 1fdf00e Add stats for objects marked
markshannon 5e813c5 Start with mark phase
markshannon 8bd7606 Add stats for visits during marking
markshannon 3513da2 Visit new frames before each increment
markshannon ab1faec Redo stats
markshannon 9e2d93c Fix freezing and GC untracking
markshannon 3c18fc8 Don't untrack dicts
markshannon 94da963 Remove lazy dict tracking from no-gil build
markshannon 659fd1e Remove unused variable
markshannon 4cfbc4f Add news
markshannon 8c92ca6 Fix use after free
markshannon 12d7f7c Attempt more careful fix of use-after-free
markshannon 1f619d7 Typo
markshannon b55fe37 Fix use of uninitialized variable
markshannon 73b7f52 Fix compiler warnings
markshannon 33f6386 Tweak test
markshannon 8574d00 Add section to internal docs
markshannon 70007b0 Rephrase new docs
markshannon f043080 Use symbolic constant
markshannon db2e173 Update section on untracking
markshannon 6a50c2f Merge branch 'main' into mark-first-gc
markshannon b9467ec Update docs
markshannon 14ae8d7 A few more edits
markshannon 3337512 Update comment
markshannon 3ae87fa Address doc review comments
markshannon a2d9e3e Merge branch 'main' into mark-first-gc
markshannon 1452378 Avoid repeated collection of the young gen
markshannon 595b14c Clearer calculation of work to do.
markshannon 278059b Make sure tuples are untracked and avoid quadratic time validation
markshannon f186b4a Update InternalDocs/garbage_collector.md
markshannon 5f6d04e Remove unused variable
markshannon 9cfb5f0 Tweak work to do calculation
markshannon c7683a4 Explain work to do calculation
markshannon 170ea6d Initialize field to prevent code analyzer warning.
markshannon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -466,8 +466,8 @@ static inline void _PyObject_GC_TRACK( | ||
| PyGC_Head *last = (PyGC_Head*)(generation0->_gc_prev); | ||
| _PyGCHead_SET_NEXT(last, gc); | ||
| _PyGCHead_SET_PREV(gc, last); | ||
| /* Young objects will be moved into the visited space during GC, so set the bit here */ | ||
| gc->_gc_next = ((uintptr_t)generation0) | (uintptr_t)interp->gc.visited_space; | ||
| uintptr_t not_visited = 1 ^ interp->gc.visited_space; | ||
| gc->_gc_next = ((uintptr_t)generation0) | not_visited; | ||
iritkatriel marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading. Please reload this page. | ||
| generation0->_gc_prev = (uintptr_t)gc; | ||
| #endif | ||
| } | ||
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
Uh oh!
There was an error while loading. Please reload this page.