mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Gather stats for PRECALL_METHOD. (GH-31259)
This commit is contained in:
parent
e19059ecd8
commit
1a6411f573
2 changed files with 14 additions and 2 deletions
|
@ -4451,8 +4451,11 @@ handle_eval_breaker:
|
|||
assert(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)]++;
|
||||
SpecializationStats *stats =
|
||||
&_py_stats.opcode_stats[PRECALL_FUNCTION].specialization;
|
||||
stats->failure++;
|
||||
int kind = _PySpecialization_ClassifyCallable(call_shape.callable);
|
||||
stats->failure_kinds[kind]++;
|
||||
#endif
|
||||
DISPATCH();
|
||||
}
|
||||
|
@ -4493,6 +4496,14 @@ handle_eval_breaker:
|
|||
|
||||
call_shape.total_args = nargs;
|
||||
assert(call_shape.kwnames == NULL);
|
||||
#ifdef Py_STATS
|
||||
extern int _PySpecialization_ClassifyCallable(PyObject *);
|
||||
SpecializationStats *stats =
|
||||
&_py_stats.opcode_stats[PRECALL_METHOD].specialization;
|
||||
stats->failure++;
|
||||
int kind = _PySpecialization_ClassifyCallable(call_shape.callable);
|
||||
stats->failure_kinds[kind]++;
|
||||
#endif
|
||||
DISPATCH();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue