diff options
author | mpage <mpage@meta.com> | 2024-11-22 20:07:05 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-22 20:07:05 (GMT) |
commit | d24a22e9b6377797c3b602945347096fbe065670 (patch) | |
tree | 3895a30f067ffdad159565e32a8ec963b5d55236 | |
parent | 4b12a6ff4ac6659156a01ae224249c7e145ff865 (diff) | |
download | cpython-d24a22e9b6377797c3b602945347096fbe065670.zip cpython-d24a22e9b6377797c3b602945347096fbe065670.tar.gz cpython-d24a22e9b6377797c3b602945347096fbe065670.tar.bz2 |
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.
-rw-r--r-- | Python/specialize.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/specialize.c b/Python/specialize.c index 716d53a..c1f4b06 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()); } |