mirror of
https://github.com/python/cpython.git
synced 2025-08-27 20:25:18 +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
13
Python/generated_cases.c.h
generated
13
Python/generated_cases.c.h
generated
|
@ -5092,15 +5092,18 @@
|
|||
_PyFrame_SetStackPointer(frame, stack_pointer);
|
||||
int optimized = _PyOptimizer_Optimize(frame, start, stack_pointer, &executor, 0);
|
||||
stack_pointer = _PyFrame_GetStackPointer(frame);
|
||||
if (optimized < 0) goto error;
|
||||
if (optimized) {
|
||||
if (optimized <= 0) {
|
||||
this_instr[1].counter = restart_backoff_counter(counter);
|
||||
if (optimized < 0) goto error;
|
||||
}
|
||||
else {
|
||||
_PyFrame_SetStackPointer(frame, stack_pointer);
|
||||
this_instr[1].counter = initial_jump_backoff_counter();
|
||||
stack_pointer = _PyFrame_GetStackPointer(frame);
|
||||
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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue