From ddc0e1a6ad09eaa524b380b254a7887d07c596be Mon Sep 17 00:00:00 2001 From: mpage Date: Fri, 22 Nov 2024 12:07:05 -0800 Subject: [PATCH] gh-115999: Record success in `specialize` (#127167) Record success in `specialize` This matches the existing behavior where we increment the success stat for the generic opcode each time we successfully specialize an instruction. --- Python/specialize.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Python/specialize.c b/Python/specialize.c index 716d53a495c21b1..c1f4b0601cc8d55 100644 --- a/Python/specialize.c +++ b/Python/specialize.c @@ -715,6 +715,7 @@ specialize(_Py_CODEUNIT *instr, uint8_t specialized_opcode) SPEC_FAIL_OTHER); return; } + STAT_INC(_PyOpcode_Deopt[specialized_opcode], success); set_counter((_Py_BackoffCounter *)instr + 1, adaptive_counter_cooldown()); }