GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-102304: Move the Total Refcount to PyInterpreterState by ericsnowcurrently · Pull Request #102545 · python/cpython

Conversation

@ericsnowcurrently

@ericsnowcurrently ericsnowcurrently commented Mar 8, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

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.)

  • Issue: Move _Py_RefTotal to PyInterpreterState #102304

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@ericsnowcurrently ericsnowcurrently added the skip news label Mar 8, 2023
@bedevere-bot bedevere-bot mentioned this pull request Mar 8, 2023
Move _Py_RefTotal to PyInterpreterState #102304
Closed
@bedevere-bot bedevere-bot added the awaiting core review label Mar 8, 2023
@ericsnowcurrently
ericsnowcurrently force-pushed the isolate-pyreftotal branch 2 times, most recently from b3bb5e5 to 668eb4c Compare March 9, 2023 19:13
@ericsnowcurrently

ericsnowcurrently commented Mar 14, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ericsnowcurrently ericsnowcurrently mentioned this pull request Mar 14, 2023
gh-101659: Isolate "obmalloc" State to Each Interpreter #101660
Merged
@ericsnowcurrently
ericsnowcurrently force-pushed the isolate-pyreftotal branch 3 times, most recently from 780e7ec to 68da9da Compare March 20, 2023 16:39
ericsnowcurrently added 5 commits March 20, 2023 11:37
@ericsnowcurrently
Move _Py_RefTotal to PyInterpreterState.
a35bceb
@ericsnowcurrently
Deal with Py_None getting incref'ed before the GIL is created.
cf58f54
@ericsnowcurrently
Fix _PyType_InitCache().
8159be6
@ericsnowcurrently
Track refcounts leaked by interpreters.
d7e51e5
@ericsnowcurrently
Move _PyInterpreterState_FinalizeRefTotal() down to PyInterpreterStat…
f64202d
…e_Delete().
@ericsnowcurrently
ericsnowcurrently force-pushed the isolate-pyreftotal branch from 68da9da to f64202d Compare March 20, 2023 18:06
@ericsnowcurrently
Guard for Py_REF_DEBUG.
475db68
@ericsnowcurrently
ericsnowcurrently marked this pull request as ready for review March 20, 2023 19:17
@ericsnowcurrently
ericsnowcurrently requested review from markshannon and methane as code owners 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

bedevere-bot commented Mar 20, 2023

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

ericsnowcurrently commented Mar 21, 2023

Copy link
Copy Markdown
Member Author

The refleak buildbots all look good.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ericsnowcurrently
ericsnowcurrently merged commit 7436874 into python:main Mar 21, 2023
@bedevere-bot bedevere-bot removed the awaiting core review label 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
@ericsnowcurrently @Fidget-Spinner
pythongh-102304: Move the Total Refcount to PyInterpreterState (pytho…
4ae6f69
…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
@ericsnowcurrently @warsaw
pythongh-102304: Move the Total Refcount to PyInterpreterState (pytho…
007d081
…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

Reviewers

@markshannon markshannon Awaiting requested review from markshannon markshannon is a code owner
@methane methane Awaiting requested review from methane methane is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@ericsnowcurrently @bedevere-bot
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.