Title: gh-115999: Disable the specializing adaptive interpreter in free-threaded builds by swtaarrs · Pull Request #116013 · python/cpython · GitHub
Open Graph Title: gh-115999: Disable the specializing adaptive interpreter in free-threaded builds by swtaarrs · Pull Request #116013 · python/cpython
X Title: gh-115999: Disable the specializing adaptive interpreter in free-threaded builds by swtaarrs · Pull Request #116013 · python/cpython
Description: For now, disable all specialization when the GIL might be disabled. We can reenable functionality as it is properly supported. Disabling specialization was just a few lines in pycore_code.h, then there are two related changes: Define an alternate implementation of DECREMENT_ADAPTIVE_COUNTER() for free-threaded builds that aborts, as a sanity check. Add some code to the interpreter generator to avoid unused variable warnings for variables only used by code within #ifdef ENABLE_SPECIALIZATION blocks (like this_instr and counter here). There are a variety of ways to suppress these warnings. I went with (void)foo; because it seemed like the most straightforward option, but I'm open to other suggestions. (Py_UNUSED(foo) won't work since it's intended for variables that are completely unused, and it changes the variable's name to _unused_foo.) Issue: gh-115999
Open Graph Description: For now, disable all specialization when the GIL might be disabled. We can reenable functionality as it is properly supported. Disabling specialization was just a few lines in pycore_code.h, then t...
X Description: For now, disable all specialization when the GIL might be disabled. We can reenable functionality as it is properly supported. Disabling specialization was just a few lines in pycore_code.h, then t...
Opengraph URL: https://github.com/python/cpython/pull/116013
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:35f37077-1c1e-32cd-9bff-a05151e14aa4 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | DF94:5348:10808DE:17E57D1:6A5632A3 |
| html-safe-nonce | e813c4a24e5520489120c03ac0c1b49eaacdc1541ac1b5b25d7721a70fca7290 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERjk0OjUzNDg6MTA4MDhERToxN0U1N0QxOjZBNTYzMkEzIiwidmlzaXRvcl9pZCI6IjQxMDg0MDY3OTA0NjI3ODAwNjciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 1a188ab54dbab4158f6f25596722833d483f13901fbc9b24ee12387a70aa1cfc |
| hovercard-subject-tag | pull_request:1746664809 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python/cpython/pull/116013/files |
| twitter:image | https://avatars.githubusercontent.com/u/118219?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/118219?s=400&v=4 |
| og:image:alt | For now, disable all specialization when the GIL might be disabled. We can reenable functionality as it is properly supported. Disabling specialization was just a few lines in pycore_code.h, then t... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9d78ea552aac0685ca5f006d44f88166cbbf3bb96843f8da0c5a2c0b9908430b |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423b2fb76ac2b90de5ab599b7a76a0d2b2c83f24 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width