Add stats for PRECALL_FUNCTION. (GH-31250)

This commit is contained in:
Mark Shannon 2022-02-10 11:47:52 +00:00 committed by GitHub
parent cfc1cecd7b
commit b0662ae5c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 36 additions and 3 deletions

View file

@ -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();
}