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.
This commit is contained in:
mpage 2024-11-22 12:07:05 -08:00 committed by GitHub
parent 4b12a6ff4a
commit d24a22e9b6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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());
}