From: mpage Date: Fri, 22 Nov 2024 20:07:05 +0000 (-0800) Subject: gh-115999: Record success in `specialize` (#127167) X-Git-Tag: v3.14.0a3~232 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d24a22e9b6377797c3b602945347096fbe065670;p=thirdparty%2FPython%2Fcpython.git 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. --- diff --git a/Python/specialize.c b/Python/specialize.c index 716d53a495c2..c1f4b0601cc8 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()); }