From 3eb25bd106166afe599e5bc71dcd63ee0c6c6dad Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Thu, 2 Nov 2023 17:50:10 -0400 Subject: [PATCH] gh-111663: Restore the Tier 2 uop count pystats --- Python/ceval.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Python/ceval.c b/Python/ceval.c index cf48929c7a362e..670f312f126201 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -1005,6 +1005,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int (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 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int // 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);