Skip to content

Commit 7894e18

Browse files
committed
fix
1 parent 0c67334 commit 7894e18

File tree

2 files changed

+2
-27
lines changed

2 files changed

+2
-27
lines changed

Python/ceval.c

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1460,31 +1460,6 @@ stop_tracing_and_jit(PyThreadState *tstate, _PyInterpreterFrame *frame)
14601460
if (!_PyErr_Occurred(tstate) && !_is_sys_tracing) {
14611461
err = _PyOptimizer_Optimize(frame, tstate);
14621462
}
1463-
_PyThreadStateImpl *_tstate = (_PyThreadStateImpl *)tstate;
1464-
// Deal with backoffs
1465-
_PyJitTracerState *tracer = _tstate->jit_tracer_state;
1466-
assert(tracer != NULL);
1467-
_PyExitData *exit = tracer->initial_state.exit;
1468-
if (exit == NULL) {
1469-
// We hold a strong reference to the code object, so the instruction won't be freed.
1470-
if (err <= 0) {
1471-
_Py_BackoffCounter counter = tracer->initial_state.jump_backward_instr[1].counter;
1472-
tracer->initial_state.jump_backward_instr[1].counter = restart_backoff_counter(counter);
1473-
}
1474-
else {
1475-
tracer->initial_state.jump_backward_instr[1].counter = initial_jump_backoff_counter(&tstate->interp->opt_config);
1476-
}
1477-
}
1478-
else {
1479-
// Likewise, we hold a strong reference to the executor containing this exit, so the exit is guaranteed
1480-
// to be valid to access.
1481-
if (err <= 0) {
1482-
exit->temperature = restart_backoff_counter(exit->temperature);
1483-
}
1484-
else {
1485-
exit->temperature = initial_temperature_backoff_counter(&tstate->interp->opt_config);
1486-
}
1487-
}
14881463
_PyJit_FinalizeTracing(tstate, err);
14891464
return err;
14901465
}

Python/optimizer.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,7 +1105,7 @@ _PyJit_FinalizeTracing(PyThreadState *tstate, int err)
11051105
tracer->initial_state.jump_backward_instr[1].counter = restart_backoff_counter(counter);
11061106
}
11071107
else {
1108-
tracer->initial_state.jump_backward_instr[1].counter = initial_jump_backoff_counter(&_tstate->policy);
1108+
tracer->initial_state.jump_backward_instr[1].counter = initial_jump_backoff_counter(&tstate->interp->opt_config);
11091109
}
11101110
}
11111111
else if (tracer->initial_state.executor->vm_data.valid) {
@@ -1115,7 +1115,7 @@ _PyJit_FinalizeTracing(PyThreadState *tstate, int err)
11151115
exit->temperature = restart_backoff_counter(exit->temperature);
11161116
}
11171117
else {
1118-
exit->temperature = initial_temperature_backoff_counter(&_tstate->policy);
1118+
exit->temperature = initial_temperature_backoff_counter(&tstate->interp->opt_config);
11191119
}
11201120
}
11211121
Py_CLEAR(tracer->initial_state.code);

0 commit comments

Comments
 (0)