Skip to content

gh-102304: Move the Total Refcount to PyInterpreterState - #102545

Merged
ericsnowcurrently merged 6 commits into
python:mainfrom
ericsnowcurrently:isolate-pyreftotal
Mar 21, 2023
Merged

ericsnowcurrently merged 6 commits into
python:mainfrom
ericsnowcurrently:isolate-pyreftotal

Conversation

@ericsnowcurrently

@ericsnowcurrently ericsnowcurrently commented Mar 8, 2023 •

Copy link
Copy Markdown
Member

Moving it valuable with a per-interpreter GIL. However, it is also useful without one, since it allows us to identify refleaks within a single interpreter or where references are escaping an interpreter. This becomes more important as we move the obmalloc state to PyInterpreterState.

(This PR is basically a single commit on top of gh-102543.)

@ericsnowcurrently

ericsnowcurrently commented Mar 14, 2023 •

Copy link
Copy Markdown
Member Author

FYI, I'm probably going to add some code to preserve the per-interpreter total when each subinterpreter is destroyed, so any leaks may be handled appropriately when the runtime is finalized. I may also report the per-interpreter total at interpreter finalization. We'll see.

@ericsnowcurrently
ericsnowcurrently marked this pull request as ready for review March 20, 2023 19:17
@ericsnowcurrently ericsnowcurrently added the 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section label Mar 20, 2023
@bedevere-bot

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @ericsnowcurrently for commit 475db68 🤖

If you want to schedule another build, you need to add the 🔨 test-with-refleak-buildbots label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section label Mar 20, 2023
@ericsnowcurrently

Copy link
Copy Markdown
Member Author

The refleak buildbots all look good.

@ericsnowcurrently
ericsnowcurrently merged commit 7436874 into python:main Mar 21, 2023
@ericsnowcurrently
ericsnowcurrently deleted the isolate-pyreftotal branch March 21, 2023 17:46
Fidget-Spinner pushed a commit to Fidget-Spinner/cpython that referenced this pull request Mar 27, 2023
…ngh-102545)

Moving it valuable with a per-interpreter GIL.  However, it is also useful without one, since it allows us to identify refleaks within a single interpreter or where references are escaping an interpreter.  This becomes more important as we move the obmalloc state to PyInterpreterState.

python#102304
warsaw pushed a commit to warsaw/cpython that referenced this pull request Apr 11, 2023
…ngh-102545)

Moving it valuable with a per-interpreter GIL.  However, it is also useful without one, since it allows us to identify refleaks within a single interpreter or where references are escaping an interpreter.  This becomes more important as we move the obmalloc state to PyInterpreterState.

python#102304
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants