]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-111663: Restore the Tier 2 uop count pystats (#111664)
authorMichael Droettboom <mdboom@gmail.com>
Thu, 2 Nov 2023 22:24:52 +0000 (18:24 -0400)
committerGitHub <noreply@github.com>
Thu, 2 Nov 2023 22:24:52 +0000 (15:24 -0700)
Python/ceval.c

index cf48929c7a362edc9e7c6425963f2a2ad63b8216..670f312f1262012057529f70a5d6864d53590274 100644 (file)
@@ -1005,6 +1005,7 @@ enter_tier_two:
                 (int)(stack_pointer - _PyFrame_Stackbase(frame)));
         next_uop++;
         OPT_STAT_INC(uops_executed);
+        UOP_STAT_INC(opcode, execution_count);
 #ifdef Py_STATS
         trace_uop_execution_counter++;
 #endif
@@ -1058,6 +1059,7 @@ deoptimize:
     // This presumes nothing was popped from the stack (nor pushed).
     DPRINTF(2, "DEOPT: [Opcode %d, operand %" PRIu64 "]\n", opcode, operand);
     OPT_HIST(trace_uop_execution_counter, trace_run_length_hist);
+    UOP_STAT_INC(opcode, miss);
     frame->return_offset = 0;  // Dispatch to frame->instr_ptr
     _PyFrame_SetStackPointer(frame, stack_pointer);
     Py_DECREF(current_executor);