Title: Don't inline slow path functions in the interpreter loop · Issue #132336 · python/cpython · GitHub
Open Graph Title: Don't inline slow path functions in the interpreter loop · Issue #132336 · python/cpython
X Title: Don't inline slow path functions in the interpreter loop · Issue #132336 · python/cpython
Description: Feature or enhancement Proposal: I was looking at the IPA inlining dump as part of investigating the root cause of gh-132295 and noticed that we're inlining a number of slow path functions related to specialization, instrumentation, and ...
Open Graph Description: Feature or enhancement Proposal: I was looking at the IPA inlining dump as part of investigating the root cause of gh-132295 and noticed that we're inlining a number of slow path functions related ...
X Description: Feature or enhancement Proposal: I was looking at the IPA inlining dump as part of investigating the root cause of gh-132295 and noticed that we're inlining a number of slow path functions rela...
Opengraph URL: https://github.com/python/cpython/issues/132336
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Don't inline slow path functions in the interpreter loop","articleBody":"# Feature or enhancement\n\n### Proposal:\n\nI was looking at the IPA inlining dump as part of investigating the root cause of gh-132295 and noticed that we're inlining a number of slow path functions related to specialization, instrumentation, and error handling in the interpreter loop when performing LTO (full list [here](https://gist.github.com/mpage/763d253ca6b24a75fccd94bcf84b0247)):\n\n```\n_Py_Specialize_CallKw\n_Py_Specialize_CompareOp\n_Py_Specialize_ContainsOp\n_Py_Specialize_ForIter\n_Py_Specialize_LoadGlobal\n_Py_Specialize_LoadSuperAttr\n_Py_Specialize_Send\n_Py_Specialize_StoreAttr\n_Py_Specialize_StoreSubscr\n_Py_Specialize_ToBool\n_Py_Specialize_UnpackSequence\n_Py_call_instrumentation\n_Py_call_instrumentation_instruction\n_Py_call_instrumentation_line\nget_exception_handler\n```\n\nI suspect these are being inlined because we use unit tests for collecting PGO data. These should be executed relatively infrequently for \"normal\" Python code. We should mark them as `noinline`.\n\n### Has this already been discussed elsewhere?\n\nNo response given\n\n### Links to previous discussion of this feature:\n\n_No response_\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-132337\n* gh-132424\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/mpage","@type":"Person","name":"mpage"},"datePublished":"2025-04-09T23:26:16Z","url":"https://github.com/python/cpython/issues/132336"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:8561d92c-e932-0965-59c5-9f8053264440 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9DE2:3B07B3:10F7937:1541816:6B0241C2 |
| html-safe-nonce | 02acf972631a9ed1b80bdf9b2593e71c709f3ff1c594b688e6e7b9c17b950e2a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5REUyOjNCMDdCMzoxMEY3OTM3OjE1NDE4MTY6NkIwMjQxQzIiLCJ2aXNpdG9yX2lkIjoiNjgyMDg1MDEzNTk0MjE4NTQxMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 44641399f4db6eba1414ae0141cd009faed4a773b4002f5c297eecc3d259940d |
| hovercard-subject-tag | issue:2984097947 |
| github-keyboard-shortcuts | repository,issues,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/_view_fragments/issues/show/python/cpython/132336/issue_layout |
| twitter:image | https://opengraph.githubassets.com/20525e3820d57c1c69307d7d4eb385f1a0bded5d3f7a6e72c37669be022a64a6/python/cpython/issues/132336 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/20525e3820d57c1c69307d7d4eb385f1a0bded5d3f7a6e72c37669be022a64a6/python/cpython/issues/132336 |
| og:image:alt | Feature or enhancement Proposal: I was looking at the IPA inlining dump as part of investigating the root cause of gh-132295 and noticed that we're inlining a number of slow path functions related ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mpage |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| 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 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width