mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
gh-116760: Fix pystats for trace attempts (GH-116761)
There are now at least two bytecodes that may attempt to optimize, JUMP_BACK, and more recently, COLD_EXIT. Only the JUMP_BACK was counting the attempt in the stats. This moves that counter to uop_optimize itself so it should always happen no matter where it is called from.
This commit is contained in:
parent
8c6db45ce3
commit
cef0ec1a3c
3 changed files with 1 additions and 2 deletions
|
@ -2349,7 +2349,6 @@ dummy_func(
|
|||
// Use '>=' not '>' so that the optimizer/backoff bits do not effect the result.
|
||||
// Double-check that the opcode isn't instrumented or something:
|
||||
if (offset_counter >= threshold && this_instr->op.code == JUMP_BACKWARD) {
|
||||
OPT_STAT_INC(attempts);
|
||||
_Py_CODEUNIT *start = this_instr;
|
||||
/* Back up over EXTENDED_ARGs so optimizer sees the whole instruction */
|
||||
while (oparg > 255) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue