Skip to content

Commit

Permalink
pythongh-115999: Record success in specialize (python#127167)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mpage authored and ebonnal committed Jan 10, 2025
1 parent 4ff09eb commit ddc0e1a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Python/specialize.c
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}

Expand Down

0 comments on commit ddc0e1a

Please sign in to comment.