diff options
author | Mark Shannon <mark@hotpy.org> | 2022-02-10 11:47:52 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-10 11:47:52 (GMT) |
commit | b0662ae5c83d8678506989cccbf7ba7bf61fea9d (patch) | |
tree | a8dd071fa771ad377f505333611e32b825266f3f /Python/ceval.c | |
parent | cfc1cecd7b6f0f27163b5bf519530284140cf5b2 (diff) | |
download | cpython-b0662ae5c83d8678506989cccbf7ba7bf61fea9d.zip cpython-b0662ae5c83d8678506989cccbf7ba7bf61fea9d.tar.gz cpython-b0662ae5c83d8678506989cccbf7ba7bf61fea9d.tar.bz2 |
Add stats for PRECALL_FUNCTION. (GH-31250)
Diffstat (limited to 'Python/ceval.c')
-rw-r--r-- | Python/ceval.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index 02e4e7b..958ca11 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(); } |