diff options
author | Mark Shannon <mark@hotpy.org> | 2025-04-29 08:00:14 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-29 08:00:14 (GMT) |
commit | 622300bdfa6242b0fc909235fcc64f07b3d280d7 (patch) | |
tree | 70f40299ae670af3c83ce31022e18bc62c07b421 /Python/bytecodes.c | |
parent | 01f11a0e4e8ae1132bd36d7f66af7d4dcc387d33 (diff) | |
download | cpython-622300bdfa6242b0fc909235fcc64f07b3d280d7.zip cpython-622300bdfa6242b0fc909235fcc64f07b3d280d7.tar.gz cpython-622300bdfa6242b0fc909235fcc64f07b3d280d7.tar.bz2 |
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/bytecodes.c')
-rw-r--r-- | Python/bytecodes.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Python/bytecodes.c b/Python/bytecodes.c index 40fb0d7..4e2dec7 100644 --- a/Python/bytecodes.c +++ b/Python/bytecodes.c @@ -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); |