diff options
Diffstat (limited to 'Python')
-rw-r--r-- | Python/bytecodes.c | 14 | ||||
-rw-r--r-- | Python/executor_cases.c.h | 3 | ||||
-rw-r--r-- | Python/generated_cases.c.h | 13 |
3 files changed, 20 insertions, 10 deletions
diff --git a/Python/bytecodes.c b/Python/bytecodes.c index c85b498..029bdb2 100644 --- a/Python/bytecodes.c +++ b/Python/bytecodes.c @@ -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; } diff --git a/Python/executor_cases.c.h b/Python/executor_cases.c.h index 2c2a09a..e9c9ed2 100644 --- a/Python/executor_cases.c.h +++ b/Python/executor_cases.c.h @@ -5750,6 +5750,9 @@ tstate->previous_executor = (PyObject *)current_executor; GOTO_TIER_ONE(target); } + else { + exit->temperature = initial_temperature_backoff_counter(); + } } exit->executor = executor; } diff --git a/Python/generated_cases.c.h b/Python/generated_cases.c.h index 15308d6..4d89753 100644 --- a/Python/generated_cases.c.h +++ b/Python/generated_cases.c.h @@ -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); |