diff options
| author | Mark Shannon <mark@hotpy.org> | 2022-05-27 16:31:41 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-27 16:31:41 +0100 |
| commit | bbcf42449e13c0b62f145cd49d12674ef3d5bf64 (patch) | |
| tree | 68d3a84f78de47229c46df66eafd4c27474379a7 /Objects/genobject.c | |
| parent | 8995177030c8b41885ad92b260279b7e622ecaea (diff) | |
| download | cpython-git-bbcf42449e13c0b62f145cd49d12674ef3d5bf64.tar.gz | |
GH-90230: Add stats to breakdown the origin of calls to `PyEval_EvalFrame` (GH-93284)
Diffstat (limited to 'Objects/genobject.c')
| -rw-r--r-- | Objects/genobject.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Objects/genobject.c b/Objects/genobject.c index a88522abf4..2b45e28cbf 100644 --- a/Objects/genobject.c +++ b/Objects/genobject.c @@ -13,6 +13,7 @@ #include "pycore_pystate.h" // _PyThreadState_GET() #include "structmember.h" // PyMemberDef #include "opcode.h" // SEND +#include "pystats.h" static PyObject *gen_close(PyGenObject *, PyObject *); static PyObject *async_gen_asend_new(PyAsyncGenObject *, PyObject *); @@ -218,6 +219,7 @@ gen_send_ex2(PyGenObject *gen, PyObject *arg, PyObject **presult, } gen->gi_frame_state = FRAME_EXECUTING; + EVAL_CALL_STAT_INC(EVAL_CALL_GENERATOR); result = _PyEval_EvalFrame(tstate, frame, exc); if (gen->gi_frame_state == FRAME_EXECUTING) { gen->gi_frame_state = FRAME_COMPLETED; |
