Skip to content

Commit

Permalink
GH-117457: Correct pystats uop "miss" counts (GH-117477)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdboom committed Apr 4, 2024
1 parent b5e6091 commit 0edde64
Show file tree
Hide file tree
Showing 4 changed files with 548 additions and 144 deletions.
2 changes: 0 additions & 2 deletions Python/ceval.c
Original file line number Diff line number Diff line change
Expand Up @@ -1083,15 +1083,13 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int
}
#endif
OPT_HIST(trace_uop_execution_counter, trace_run_length_hist);
UOP_STAT_INC(uopcode, miss);
Py_DECREF(current_executor);
tstate->previous_executor = NULL;
DISPATCH();

exit_to_trace:
assert(next_uop[-1].format == UOP_FORMAT_EXIT);
OPT_HIST(trace_uop_execution_counter, trace_run_length_hist);
UOP_STAT_INC(uopcode, miss);
uint32_t exit_index = next_uop[-1].exit_index;
assert(exit_index < current_executor->exit_count);
_PyExitData *exit = &current_executor->exits[exit_index];
Expand Down

0 comments on commit 0edde64

Please sign in to comment.