summaryrefslogtreecommitdiffstats
path: root/Python/ceval.c
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2021-07-29 19:50:03 (GMT)
committerGitHub <noreply@github.com>2021-07-29 19:50:03 (GMT)
commit2116909b3e1f044c268cebea78c92c7f593f99fe (patch)
treeb39210fd0ae1c5ee62cbe7fe6f7d7b9132fc6f28 /Python/ceval.c
parent7e311e496b0e26b3d3c62fe9b0ed2a4677c37ee9 (diff)
downloadcpython-2116909b3e1f044c268cebea78c92c7f593f99fe.zip
cpython-2116909b3e1f044c268cebea78c92c7f593f99fe.tar.gz
cpython-2116909b3e1f044c268cebea78c92c7f593f99fe.tar.bz2
Minor fixes to specialization stats. (GH-27457)
* Use class, not value for fail stats for BINARY_SUBSCR. * Fix counts for unquickened instructions.
Diffstat (limited to 'Python/ceval.c')
-rw-r--r--Python/ceval.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index 02eef9b..4f7edb8 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -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);
}
}