summaryrefslogtreecommitdiffstats
path: root/Python/instrumentation.c
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2023-06-22 08:48:19 (GMT)
committerGitHub <noreply@github.com>2023-06-22 08:48:19 (GMT)
commit04492cbc9aa45ac2c12d22083c406a0364c39f5b (patch)
tree4eb26dc0dca29519cabe1086aec523bc29e8f4b5 /Python/instrumentation.c
parentc01da2896ab92ba7193bcd6ae56908c5c7277e75 (diff)
downloadcpython-04492cbc9aa45ac2c12d22083c406a0364c39f5b.zip
cpython-04492cbc9aa45ac2c12d22083c406a0364c39f5b.tar.gz
cpython-04492cbc9aa45ac2c12d22083c406a0364c39f5b.tar.bz2
GH-91095: Specialize calls to normal Python classes. (GH-99331)
Diffstat (limited to 'Python/instrumentation.c')
-rw-r--r--Python/instrumentation.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/instrumentation.c b/Python/instrumentation.c
index fcaccc0..524a82c 100644
--- a/Python/instrumentation.c
+++ b/Python/instrumentation.c
@@ -1526,7 +1526,7 @@ _Py_Instrument(PyCodeObject *code, PyInterpreterState *interp)
return 0;
}
/* Insert instrumentation */
- for (int i = 0; i < code_len; i+= _PyInstruction_GetLength(code, i)) {
+ for (int i = code->_co_firsttraceable; i < code_len; i+= _PyInstruction_GetLength(code, i)) {
_Py_CODEUNIT *instr = &_PyCode_CODE(code)[i];
CHECK(instr->op.code != 0);
int base_opcode = _Py_GetBaseOpcode(code, i);