mirror of
https://github.com/python/cpython.git
synced 2025-07-13 06:15:17 +00:00
GH-126892: Reset warmup counters when JIT compiling code (GH-126893)
This commit is contained in:
parent
addb225f38
commit
48c50ff1a2
6 changed files with 48 additions and 39 deletions
|
@ -2624,15 +2624,16 @@ dummy_func(
|
|||
}
|
||||
_PyExecutorObject *executor;
|
||||
int optimized = _PyOptimizer_Optimize(frame, start, stack_pointer, &executor, 0);
|
||||
ERROR_IF(optimized < 0, error);
|
||||
if (optimized) {
|
||||
if (optimized <= 0) {
|
||||
this_instr[1].counter = restart_backoff_counter(counter);
|
||||
ERROR_IF(optimized < 0, error);
|
||||
}
|
||||
else {
|
||||
this_instr[1].counter = initial_jump_backoff_counter();
|
||||
assert(tstate->previous_executor == NULL);
|
||||
tstate->previous_executor = Py_None;
|
||||
GOTO_TIER_TWO(executor);
|
||||
}
|
||||
else {
|
||||
this_instr[1].counter = restart_backoff_counter(counter);
|
||||
}
|
||||
}
|
||||
else {
|
||||
ADVANCE_ADAPTIVE_COUNTER(this_instr[1].counter);
|
||||
|
@ -4875,6 +4876,9 @@ dummy_func(
|
|||
tstate->previous_executor = (PyObject *)current_executor;
|
||||
GOTO_TIER_ONE(target);
|
||||
}
|
||||
else {
|
||||
exit->temperature = initial_temperature_backoff_counter();
|
||||
}
|
||||
}
|
||||
exit->executor = executor;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue