FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-117657: Disable the function/code cache in free-threaded builds by mpage · Pull Request #118301 · python/cpython · GitHub

/ cpython Public

gh-117657: Disable the function/code cache in free-threaded builds - #118301

Merged
colesbury merged 3 commits into
python:mainfrom
mpage:gh-117657-tsan-func-setversion
May 3, 2024
Merged

gh-117657: Disable the function/code cache in free-threaded builds#118301
colesbury merged 3 commits into
python:mainfrom
mpage:gh-117657-tsan-func-setversion

Conversation

mpage commented Apr 26, 2024
edited
Loading

Copy link
Copy Markdown
Contributor

This is only used by the specializing interpreter and the tier 2 optimizer, both of which are disabled in free-threaded builds.

Additionally, make function version generation thread-safe in free-threaded builds. I don't think anything outside of the specializing interpreter / tier 2 optimizer actually uses this, so we could allow version generation to race if we're concerned about introducing a bottleneck with the lock.

Sample race that is fixed.

This is only used by the specializing interpreter and the tier 2
optimizer, both of which are disabled in free-threaded builds.

[Sample race](https://gist.github.com/mpage/d05a1c4616eedc9337f3f335e6485f91) that is fixed.
mpage requested a review from colesbury May 1, 2024 21:22
mpage marked this pull request as ready for review May 1, 2024 21:22
mpage requested a review from markshannon as a code owner May 1, 2024 21:22
colesbury merged commit 37d0950 into python:main May 3, 2024
SonicField pushed a commit to SonicField/cpython that referenced this pull request May 8, 2024
…lds (python#118301)

This is only used by the specializing interpreter and the tier 2
optimizer, both of which are disabled in free-threaded builds.
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL