summaryrefslogtreecommitdiffstats
path: root/Python/ceval.c
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2022-01-28 15:20:33 (GMT)
committerGitHub <noreply@github.com>2022-01-28 15:20:33 (GMT)
commit90ab138bbdc63763ad825ed6d4821367c09c4015 (patch)
tree3adaef410013002de2e488d9c37fb6abc3462082 /Python/ceval.c
parent9a241271139a317597aca71d5971346b2cfe7dbd (diff)
downloadcpython-90ab138bbdc63763ad825ed6d4821367c09c4015.zip
cpython-90ab138bbdc63763ad825ed6d4821367c09c4015.tar.gz
cpython-90ab138bbdc63763ad825ed6d4821367c09c4015.tar.bz2
bpo-46072: Add simple stats for Python calls. (GH-30989)
Diffstat (limited to 'Python/ceval.c')
-rw-r--r--Python/ceval.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index cd05780..fa14a1c 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -1651,6 +1651,7 @@ PyObject* _Py_HOT_FUNCTION
_PyEval_EvalFrameDefault(PyThreadState *tstate, InterpreterFrame *frame, int throwflag)
{
_Py_EnsureTstateNotNULL(tstate);
+ CALL_STAT_INC(pyeval_calls);
#if USE_COMPUTED_GOTOS
/* Import the static jump table */
@@ -2252,6 +2253,7 @@ handle_eval_breaker:
_PyFrame_SetStackPointer(frame, stack_pointer);
new_frame->previous = frame;
frame = cframe.current_frame = new_frame;
+ CALL_STAT_INC(inlined_py_calls);
goto start_frame;
}
@@ -4589,6 +4591,7 @@ handle_eval_breaker:
_PyFrame_SetStackPointer(frame, stack_pointer);
new_frame->previous = frame;
cframe.current_frame = frame = new_frame;
+ CALL_STAT_INC(inlined_py_calls);
goto start_frame;
}
/* Callable is not a normal Python function */
@@ -4705,6 +4708,7 @@ handle_eval_breaker:
_PyFrame_SetStackPointer(frame, stack_pointer);
new_frame->previous = frame;
frame = cframe.current_frame = new_frame;
+ CALL_STAT_INC(inlined_py_calls);
goto start_frame;
}