mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
Collect stats for UNPACK_SEQUENCE. (GH-31105)
This commit is contained in:
parent
da4d4ec185
commit
a0401d8372
2 changed files with 22 additions and 1 deletions
|
@ -2792,6 +2792,12 @@ handle_eval_breaker:
|
|||
TARGET(UNPACK_SEQUENCE) {
|
||||
PREDICTED(UNPACK_SEQUENCE);
|
||||
PyObject *seq = POP(), *item, **items;
|
||||
#ifdef Py_STATS
|
||||
extern int _PySpecialization_ClassifySequence(PyObject *);
|
||||
_py_stats.opcode_stats[UNPACK_SEQUENCE].specialization.failure++;
|
||||
_py_stats.opcode_stats[UNPACK_SEQUENCE].specialization.
|
||||
failure_kinds[_PySpecialization_ClassifySequence(seq)]++;
|
||||
#endif
|
||||
if (PyTuple_CheckExact(seq) &&
|
||||
PyTuple_GET_SIZE(seq) == oparg) {
|
||||
items = ((PyTupleObject *)seq)->ob_item;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue