From 01c2d73dff3c9936d76d87454bc67af8559440b9 Mon Sep 17 00:00:00 2001 From: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Date: Tue, 28 Oct 2025 00:12:59 +0000 Subject: [PATCH] fix backoff counters --- Python/bytecodes.c | 1 + Python/generated_cases.c.h | 1 + 2 files changed, 2 insertions(+) diff --git a/Python/bytecodes.c b/Python/bytecodes.c index b3977e5613b4..96772a772f24 100644 --- a/Python/bytecodes.c +++ b/Python/bytecodes.c @@ -2956,6 +2956,7 @@ dummy_func( if (!IS_JIT_TRACING() && backoff_counter_triggers(counter) && this_instr->op.code == JUMP_BACKWARD_JIT && next_instr->op.code != ENTER_EXECUTOR) { + this_instr[1].counter = restart_backoff_counter(counter); if (tstate->interp->jit_state.code_buffer == NULL) { tstate->interp->jit_state.code_buffer = (_PyUOpInstruction *)_PyObject_VirtualAlloc(UOP_BUFFER_SIZE); if (tstate->interp->jit_state.code_buffer == NULL) { diff --git a/Python/generated_cases.c.h b/Python/generated_cases.c.h index b97f4987c80f..7daab9556e74 100644 --- a/Python/generated_cases.c.h +++ b/Python/generated_cases.c.h @@ -7682,6 +7682,7 @@ if (!IS_JIT_TRACING() && backoff_counter_triggers(counter) && this_instr->op.code == JUMP_BACKWARD_JIT && next_instr->op.code != ENTER_EXECUTOR) { + this_instr[1].counter = restart_backoff_counter(counter); if (tstate->interp->jit_state.code_buffer == NULL) { _PyFrame_SetStackPointer(frame, stack_pointer); tstate->interp->jit_state.code_buffer = (_PyUOpInstruction *)_PyObject_VirtualAlloc(UOP_BUFFER_SIZE); -- 2.47.3