From b0662ae5c83d8678506989cccbf7ba7bf61fea9d Mon Sep 17 00:00:00 2001 From: Mark Shannon Date: Thu, 10 Feb 2022 11:47:52 +0000 Subject: Add stats for PRECALL_FUNCTION. (GH-31250) --- Python/ceval.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Python/ceval.c') diff --git a/Python/ceval.c b/Python/ceval.c index 02e4e7b9e4..958ca11409 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -4447,6 +4447,11 @@ handle_eval_breaker: call_shape.total_args = oparg; call_shape.kwnames = NULL; +#ifdef Py_STATS + extern int _PySpecialization_ClassifyCallable(PyObject *); + _py_stats.opcode_stats[PRECALL_FUNCTION].specialization.failure++; + _py_stats.opcode_stats[PRECALL_FUNCTION].specialization.failure_kinds[_PySpecialization_ClassifyCallable(call_shape.callable)]++; +#endif DISPATCH(); } -- cgit v1.2.1