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-123923: Defer refcounting for `f_funcobj` in `_PyInterpreterFrame` by colesbury · Pull Request #124026 · python/cpython

Conversation

@colesbury

@colesbury colesbury commented Sep 12, 2024 •
edited by bedevere-app Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Use a _PyStackRef and defer the reference to f_funcobj when possible. This avoids some reference count contention in the common case of executing the same code object from multiple threads concurrently in the free-threaded build.

  • Issue: Use deferred reference counting in some _PyInterpreterFrame fields #123923

Sorry, something went wrong.

Uh oh!

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

All reactions
@colesbury
pythongh-123923: Defer refcounting for f_funcobj in `_PyInterpreter…
db12634
…Frame`

Use a `_PyStackRef` and defer the reference to `f_funcobj` when
possible. This avoids some reference count contention in the common case
of executing the same code object from multiple threads concurrently in
the free-threaded build.
@colesbury colesbury added the topic-free-threading label Sep 12, 2024
@bedevere-app bedevere-app Bot mentioned this pull request Sep 12, 2024
Use deferred reference counting in some _PyInterpreterFrame fields #123923
Closed
@colesbury colesbury added the 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section label Sep 12, 2024
@bedevere-bot

bedevere-bot commented Sep 12, 2024

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @colesbury for commit db12634 🤖

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 Sep 12, 2024
@colesbury colesbury added the skip news label Sep 12, 2024
@colesbury
Fix tier2 optimizer
963896a
@colesbury
colesbury marked this pull request as ready for review September 12, 2024 22:49
@colesbury
colesbury requested review from Fidget-Spinner, ericsnowcurrently and markshannon as code owners September 12, 2024 22:49
@bedevere-app bedevere-app Bot added the awaiting core review label Sep 12, 2024
colesbury
colesbury commented Sep 12, 2024
View reviewed changes
Comment thread Tools/cases_generator/generators_common.py
target = uop.deferred_refs[tkn]
if target is None:
# An assignment we don't handle, such as to a pointer or array.
self.out.emit(tkn)

@colesbury colesbury Sep 12, 2024

Copy link
Copy Markdown
Contributor Author

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.

This change seemed to fix some duplicate ;; in generated_cases.c.h

Sorry, something went wrong.

Uh oh!

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

All reactions
@colesbury colesbury mentioned this pull request Sep 13, 2024
test_asyncio.test_base_events leaks references in free-threaded build #124068
Closed
colesbury added 2 commits September 14, 2024 14:30
@colesbury
Merge branch 'main' into pythongh-123923-defer-func
68d360e
@colesbury
Simplify code after merge
cd3d83d
@colesbury colesbury added the 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section label Sep 14, 2024
@bedevere-bot

bedevere-bot commented Sep 14, 2024

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @colesbury for commit cd3d83d 🤖

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 Sep 14, 2024
Fidget-Spinner
Fidget-Spinner approved these changes Sep 17, 2024
View reviewed changes
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting core review labels Sep 17, 2024
@colesbury
Merge branch 'main' into pythongh-123923-defer-func
6a1014f
@colesbury
colesbury enabled auto-merge (squash) September 20, 2024 18:47
@colesbury
Merge branch 'main' into pythongh-123923-defer-func
2fde56d
@colesbury
colesbury merged commit f4997bb into python:main Sep 24, 2024
@bedevere-app bedevere-app Bot removed the awaiting merge label Sep 24, 2024
@colesbury
colesbury deleted the gh-123923-defer-func branch October 1, 2024 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Fidget-Spinner Fidget-Spinner Fidget-Spinner approved these changes
@markshannon markshannon Awaiting requested review from markshannon markshannon is a code owner
@ericsnowcurrently ericsnowcurrently Awaiting requested review from ericsnowcurrently ericsnowcurrently is a code owner

Uh oh!

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

Assignees

No one assigned

Labels

skip news topic-free-threading

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.

3 participants

@colesbury @bedevere-bot @Fidget-Spinner
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.