mirror of
https://github.com/python/cpython.git
synced 2025-08-27 04:05:34 +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
|
@ -3029,6 +3029,9 @@ dummy_func(
|
|||
}
|
||||
|
||||
inst(GET_ITER, (iterable -- iter)) {
|
||||
#ifdef Py_STATS
|
||||
_Py_GatherStats_GetIter(iterable);
|
||||
#endif
|
||||
/* before: [obj]; after [getiter(obj)] */
|
||||
PyObject *iter_o = PyObject_GetIter(PyStackRef_AsPyObjectBorrow(iterable));
|
||||
PyStackRef_CLOSE(iterable);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue