Skip to content

Commit c4ab024

Browse files
gh-142448: Disable JIT tracing when monitoring is enabled (GH-142842)
1 parent 28da1fb commit c4ab024

File tree

3 files changed

+17
-6
lines changed

3 files changed

+17
-6
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix a bug when using monitoring with the JIT.

Python/bytecodes.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5575,9 +5575,14 @@ dummy_func(
55755575
next_instr = this_instr;
55765576
frame->instr_ptr = prev_instr;
55775577
opcode = next_instr->op.code;
5578-
bool stop_tracing = (opcode == WITH_EXCEPT_START ||
5579-
opcode == RERAISE || opcode == CLEANUP_THROW ||
5580-
opcode == PUSH_EXC_INFO || opcode == INTERPRETER_EXIT);
5578+
bool stop_tracing = (
5579+
opcode == WITH_EXCEPT_START ||
5580+
opcode == RERAISE ||
5581+
opcode == CLEANUP_THROW ||
5582+
opcode == PUSH_EXC_INFO ||
5583+
opcode == INTERPRETER_EXIT ||
5584+
(opcode >= MIN_INSTRUMENTED_OPCODE && opcode != ENTER_EXECUTOR)
5585+
);
55815586
int full = !_PyJit_translate_single_bytecode_to_trace(tstate, frame, next_instr, stop_tracing ? _DEOPT : 0);
55825587
if (full) {
55835588
LEAVE_TRACING();

Python/generated_cases.c.h

Lines changed: 8 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)