mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
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
This commit is contained in:
parent
01f11a0e4e
commit
622300bdfa
6 changed files with 64 additions and 1 deletions
5
Python/executor_cases.c.h
generated
5
Python/executor_cases.c.h
generated
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue