summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormpage <mpage@meta.com>2024-11-22 20:07:05 (GMT)
committerGitHub <noreply@github.com>2024-11-22 20:07:05 (GMT)
commitd24a22e9b6377797c3b602945347096fbe065670 (patch)
tree3895a30f067ffdad159565e32a8ec963b5d55236
parent4b12a6ff4ac6659156a01ae224249c7e145ff865 (diff)
downloadcpython-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.c1
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());
}