aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python/executor_cases.c.h
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2025-04-29 09:00:14 +0100
committerGitHub <noreply@github.com>2025-04-29 09:00:14 +0100
commit622300bdfa6242b0fc909235fcc64f07b3d280d7 (patch)
tree70f40299ae670af3c83ce31022e18bc62c07b421 /Python/executor_cases.c.h
parent01f11a0e4e8ae1132bd36d7f66af7d4dcc387d33 (diff)
downloadcpython-622300bdfa6242b0fc909235fcc64f07b3d280d7.tar.gz
cpython-622300bdfa6242b0fc909235fcc64f07b3d280d7.zip
GH-132554: Add stats for GET_ITER (GH-132592)
* Add stats for GET_ITER * Look for common iterable types, not iterator types * Add stats for self iter and fix naming in summary
Diffstat (limited to 'Python/executor_cases.c.h')
-rw-r--r--Python/executor_cases.c.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/Python/executor_cases.c.h b/Python/executor_cases.c.h
index 978662b241a..09998090575 100644
--- a/Python/executor_cases.c.h
+++ b/Python/executor_cases.c.h
@@ -4075,6 +4075,11 @@
_PyStackRef iterable;
_PyStackRef iter;
iterable = stack_pointer[-1];
+ #ifdef Py_STATS
+ _PyFrame_SetStackPointer(frame, stack_pointer);
+ _Py_GatherStats_GetIter(iterable);
+ stack_pointer = _PyFrame_GetStackPointer(frame);
+ #endif
_PyFrame_SetStackPointer(frame, stack_pointer);
PyObject *iter_o = PyObject_GetIter(PyStackRef_AsPyObjectBorrow(iterable));
stack_pointer = _PyFrame_GetStackPointer(frame);