mirror of
https://github.com/python/cpython.git
synced 2025-08-27 12:16:04 +00:00
GH-116968: Remove branch from advance_backoff_counter (GH-124469)
This commit is contained in:
parent
31516c98dd
commit
f55273b3b7
4 changed files with 29 additions and 33 deletions
|
@ -643,8 +643,8 @@ de_instrument(PyCodeObject *code, int i, int event)
|
|||
CHECK(_PyOpcode_Deopt[deinstrumented] == deinstrumented);
|
||||
FT_ATOMIC_STORE_UINT8_RELAXED(*opcode_ptr, deinstrumented);
|
||||
if (_PyOpcode_Caches[deinstrumented]) {
|
||||
FT_ATOMIC_STORE_UINT16_RELAXED(instr[1].counter.as_counter,
|
||||
adaptive_counter_warmup().as_counter);
|
||||
FT_ATOMIC_STORE_UINT16_RELAXED(instr[1].counter.value_and_backoff,
|
||||
adaptive_counter_warmup().value_and_backoff);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -719,8 +719,8 @@ instrument(PyCodeObject *code, int i)
|
|||
assert(instrumented);
|
||||
FT_ATOMIC_STORE_UINT8_RELAXED(*opcode_ptr, instrumented);
|
||||
if (_PyOpcode_Caches[deopt]) {
|
||||
FT_ATOMIC_STORE_UINT16_RELAXED(instr[1].counter.as_counter,
|
||||
adaptive_counter_warmup().as_counter);
|
||||
FT_ATOMIC_STORE_UINT16_RELAXED(instr[1].counter.value_and_backoff,
|
||||
adaptive_counter_warmup().value_and_backoff);
|
||||
instr[1].counter = adaptive_counter_warmup();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue