mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Minor fixes to specialization stats. (GH-27457)
* Use class, not value for fail stats for BINARY_SUBSCR. * Fix counts for unquickened instructions.
This commit is contained in:
parent
7e311e496b
commit
2116909b3e
3 changed files with 13 additions and 5 deletions
|
@ -1931,6 +1931,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, InterpreterFrame *frame, int thr
|
|||
UPDATE_PREV_INSTR_OPARG(next_instr, oparg - 1);
|
||||
assert(_Py_OPCODE(next_instr[-1]) == BINARY_SUBSCR_ADAPTIVE);
|
||||
assert(_Py_OPARG(next_instr[-1]) == oparg - 1);
|
||||
STAT_DEC(BINARY_SUBSCR, unquickened);
|
||||
JUMP_TO_INSTRUCTION(BINARY_SUBSCR);
|
||||
}
|
||||
}
|
||||
|
@ -2943,6 +2944,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, InterpreterFrame *frame, int thr
|
|||
STAT_INC(LOAD_GLOBAL, deferred);
|
||||
cache->adaptive.counter--;
|
||||
oparg = cache->adaptive.original_oparg;
|
||||
STAT_DEC(LOAD_GLOBAL, unquickened);
|
||||
JUMP_TO_INSTRUCTION(LOAD_GLOBAL);
|
||||
}
|
||||
}
|
||||
|
@ -3380,6 +3382,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, InterpreterFrame *frame, int thr
|
|||
STAT_INC(LOAD_ATTR, deferred);
|
||||
cache->adaptive.counter--;
|
||||
oparg = cache->adaptive.original_oparg;
|
||||
STAT_DEC(LOAD_ATTR, unquickened);
|
||||
JUMP_TO_INSTRUCTION(LOAD_ATTR);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue