aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python/instrumentation.c
diff options
context:
space:
mode:
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 fcaccc022c8..524a82c076e 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);