From 0a67f82eb1daf0afaebc68f31ac7e4609f314353 Mon Sep 17 00:00:00 2001 From: Brandt Bucher Date: Wed, 12 Oct 2022 16:04:47 -0700 Subject: [3.11] GH-93354: Fix PRECALL's adaptive backoff (GH-98011) --- Python/ceval.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Python') diff --git a/Python/ceval.c b/Python/ceval.c index c5283ace43c..c0d9c68de04 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -4793,7 +4793,7 @@ handle_eval_breaker: TARGET(PRECALL_ADAPTIVE) { _PyPrecallCache *cache = (_PyPrecallCache *)next_instr; - if (cache->counter == 0) { + if (ADAPTIVE_COUNTER_IS_ZERO(cache)) { next_instr--; int is_meth = is_method(stack_pointer, oparg); int nargs = oparg + is_meth; @@ -4807,7 +4807,7 @@ handle_eval_breaker: } else { STAT_INC(PRECALL, deferred); - cache->counter--; + DECREMENT_ADAPTIVE_COUNTER(cache); JUMP_TO_INSTRUCTION(PRECALL); } } -- cgit v1.3.1