Skip to content

Commit 96b7bb2

Browse files
Fix progress needed and warmup
1 parent fd3bb48 commit 96b7bb2

File tree

4 files changed

+3
-19
lines changed

4 files changed

+3
-19
lines changed

Python/bytecodes.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3047,13 +3047,7 @@ dummy_func(
30473047
assert(executor != tstate->interp->cold_executor);
30483048
tstate->jit_exit = NULL;
30493049
if (IS_JIT_TRACING()) {
3050-
int old_opcode = executor->vm_data.opcode;
3051-
int old_oparg = (oparg & ~255) | executor->vm_data.oparg;
30523050
RECORD_TRACE_NO_DISPATCH();
3053-
opcode = old_opcode;
3054-
oparg = old_oparg;
3055-
next_instr = this_instr;
3056-
DISPATCH_GOTO();
30573051
}
30583052
TIER1_TO_TIER2(executor);
30593053
#else
@@ -5453,6 +5447,7 @@ dummy_func(
54535447
exit->temperature = advance_backoff_counter(temperature);
54545448
GOTO_TIER_ONE(target, 0);
54555449
}
5450+
exit->temperature = initial_temperature_backoff_counter();
54565451
_PyExecutorObject *previous_executor = _PyExecutor_FromExit(exit);
54575452
assert(tstate->current_executor == (PyObject *)previous_executor);
54585453
int chain_depth = is_dynamic ? 0 : current_executor->vm_data.chain_depth + 1;

Python/executor_cases.c.h

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Python/generated_cases.c.h

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

Python/optimizer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ _PyJIT_translate_single_bytecode_to_trace(
638638

639639
/* Special case the first instruction,
640640
* so that we can guarantee forward progress */
641-
if (progress_needed && is_first_instr && tstate->interp->jit_tracer_code_curr_size == 0) {
641+
if (progress_needed && is_first_instr) {
642642
if (OPCODE_HAS_EXIT(opcode) || OPCODE_HAS_DEOPT(opcode)) {
643643
opcode = _PyOpcode_Deopt[opcode];
644644
}

0 commit comments

Comments
 (0)