https://github.com/python/cpython/commit/d24a22e9b6377797c3b602945347096fbe065670
commit: d24a22e9b6377797c3b602945347096fbe065670
branch: main
author: mpage <[email protected]>
committer: mpage <[email protected]>
date: 2024-11-22T12:07:05-08:00
summary:

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.

files:
M Python/specialize.c

diff --git a/Python/specialize.c b/Python/specialize.c
index 716d53a495c21b..c1f4b0601cc8d5 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());
 }
 

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to