gh-124218: Refactor per-thread reference counting#124844
Merged
colesbury merged 4 commits intopython:mainfrom Oct 1, 2024
Merged
gh-124218: Refactor per-thread reference counting#124844colesbury merged 4 commits intopython:mainfrom
colesbury merged 4 commits intopython:mainfrom
Conversation
Fidget-Spinner
approved these changes
Oct 1, 2024
Member
Fidget-Spinner
left a comment
There was a problem hiding this comment.
LGTM. Mostly just moving files around.
Comment on lines
+190
to
+192
| if (PyType_Check(obj)) { | ||
| assert(PyType_HasFeature((PyTypeObject *)obj, Py_TPFLAGS_HEAPTYPE)); | ||
| ((PyHeapTypeObject *)obj)->unique_id = -1; |
Member
There was a problem hiding this comment.
Ah cool so you made it more general to support not just types? Got it.
Contributor
Author
There was a problem hiding this comment.
Yeah, we want to support it on code objects and certain dictionaries (globals, builtins). Option 2a from the linked issue: #124218.
|
🤖 New build scheduled with the buildbot fleet by @colesbury for commit e5ec9f7 🤖 If you want to schedule another build, you need to add the 🔨 test-with-refleak-buildbots label again. |
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.
Currently, we only use per-thread reference counting for heap type objects and the naming reflects that. We will extend it to a few additional types in an upcoming change to avoid scaling bottlenecks when creating nested functions.
Rename some of the files and functions in preparation for this change.