summaryrefslogtreecommitdiffstats
path: root/Include/internal/pycore_runtime_init_generated.h
diff options
context:
space:
mode:
authorSam Gross <colesbury@gmail.com>2025-03-26 18:38:47 (GMT)
committerGitHub <noreply@github.com>2025-03-26 18:38:47 (GMT)
commit67fbfb42bd5dfe861d0c58d9e6c48d8eef033d24 (patch)
tree282178fa55571c055c8327dc3d77fa6a882a404b /Include/internal/pycore_runtime_init_generated.h
parent3d4ac1a2c2b610f35a9e164878d67185e4a3546f (diff)
downloadcpython-67fbfb42bd5dfe861d0c58d9e6c48d8eef033d24.zip
cpython-67fbfb42bd5dfe861d0c58d9e6c48d8eef033d24.tar.gz
cpython-67fbfb42bd5dfe861d0c58d9e6c48d8eef033d24.tar.bz2
gh-131586: Avoid refcount contention in some "special" calls (#131588)
In the free threaded build, the `_PyObject_LookupSpecial()` call can lead to reference count contention on the returned function object becuase it doesn't use stackrefs. Refactor some of the callers to use `_PyObject_MaybeCallSpecialNoArgs`, which uses stackrefs internally. This fixes the scaling bottleneck in the "lookup_special" microbenchmark in `ftscalingbench.py`. However, the are still some uses of `_PyObject_LookupSpecial()` that need to be addressed in future PRs.
Diffstat (limited to 'Include/internal/pycore_runtime_init_generated.h')
-rw-r--r--Include/internal/pycore_runtime_init_generated.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/Include/internal/pycore_runtime_init_generated.h b/Include/internal/pycore_runtime_init_generated.h
index 554fbda..2582d32 100644
--- a/Include/internal/pycore_runtime_init_generated.h
+++ b/Include/internal/pycore_runtime_init_generated.h
@@ -596,6 +596,7 @@ extern "C" {
INIT_ID(__bytes__), \
INIT_ID(__call__), \
INIT_ID(__cantrace__), \
+ INIT_ID(__ceil__), \
INIT_ID(__class__), \
INIT_ID(__class_getitem__), \
INIT_ID(__classcell__), \
@@ -620,6 +621,7 @@ extern "C" {
INIT_ID(__file__), \
INIT_ID(__firstlineno__), \
INIT_ID(__float__), \
+ INIT_ID(__floor__), \
INIT_ID(__floordiv__), \
INIT_ID(__format__), \
INIT_ID(__fspath__), \
@@ -725,6 +727,7 @@ extern "C" {
INIT_ID(__subclasscheck__), \
INIT_ID(__subclasshook__), \
INIT_ID(__truediv__), \
+ INIT_ID(__trunc__), \
INIT_ID(__type_params__), \
INIT_ID(__typing_is_unpacked_typevartuple__), \
INIT_ID(__typing_prepare_subst__), \