1919// Define _PY_INTERPRETER macro to increment interpreter_increfs and
2020// interpreter_decrefs. Otherwise, increment increfs and decrefs.
2121
22- #include "pycore_uop_ids.h"
23-
2422#ifndef Py_CPYTHON_PYSTATS_H
2523# error "this header file must not be included directly"
2624#endif
2725
26+ #define PYSTATS_MAX_UOP_ID 512
27+
2828#define SPECIALIZATION_FAILURE_KINDS 36
2929
3030/* Stats for determining who is calling PyEval_EvalFrame */
@@ -100,7 +100,7 @@ typedef struct _gc_stats {
100100typedef struct _uop_stats {
101101 uint64_t execution_count ;
102102 uint64_t miss ;
103- uint64_t pair_count [MAX_UOP_ID + 1 ];
103+ uint64_t pair_count [PYSTATS_MAX_UOP_ID + 1 ];
104104} UOpStats ;
105105
106106#define _Py_UOP_HIST_SIZE 32
@@ -118,7 +118,7 @@ typedef struct _optimization_stats {
118118 uint64_t recursive_call ;
119119 uint64_t low_confidence ;
120120 uint64_t executors_invalidated ;
121- UOpStats opcode [MAX_UOP_ID + 1 ];
121+ UOpStats opcode [PYSTATS_MAX_UOP_ID + 1 ];
122122 uint64_t unsupported_opcode [256 ];
123123 uint64_t trace_length_hist [_Py_UOP_HIST_SIZE ];
124124 uint64_t trace_run_length_hist [_Py_UOP_HIST_SIZE ];
@@ -128,7 +128,7 @@ typedef struct _optimization_stats {
128128 uint64_t optimizer_failure_reason_no_memory ;
129129 uint64_t remove_globals_builtins_changed ;
130130 uint64_t remove_globals_incorrect_keys ;
131- uint64_t error_in_opcode [MAX_UOP_ID + 1 ];
131+ uint64_t error_in_opcode [PYSTATS_MAX_UOP_ID + 1 ];
132132} OptimizationStats ;
133133
134134typedef struct _rare_event_stats {
0 commit comments