19
19
// Define _PY_INTERPRETER macro to increment interpreter_increfs and
20
20
// interpreter_decrefs. Otherwise, increment increfs and decrefs.
21
21
22
- #include "pycore_uop_ids.h"
23
-
24
22
#ifndef Py_CPYTHON_PYSTATS_H
25
23
# error "this header file must not be included directly"
26
24
#endif
27
25
26
+ #define PYSTATS_MAX_UOP_ID 512
27
+
28
28
#define SPECIALIZATION_FAILURE_KINDS 36
29
29
30
30
/* Stats for determining who is calling PyEval_EvalFrame */
@@ -100,7 +100,7 @@ typedef struct _gc_stats {
100
100
typedef struct _uop_stats {
101
101
uint64_t execution_count ;
102
102
uint64_t miss ;
103
- uint64_t pair_count [MAX_UOP_ID + 1 ];
103
+ uint64_t pair_count [PYSTATS_MAX_UOP_ID + 1 ];
104
104
} UOpStats ;
105
105
106
106
#define _Py_UOP_HIST_SIZE 32
@@ -118,7 +118,7 @@ typedef struct _optimization_stats {
118
118
uint64_t recursive_call ;
119
119
uint64_t low_confidence ;
120
120
uint64_t executors_invalidated ;
121
- UOpStats opcode [MAX_UOP_ID + 1 ];
121
+ UOpStats opcode [PYSTATS_MAX_UOP_ID + 1 ];
122
122
uint64_t unsupported_opcode [256 ];
123
123
uint64_t trace_length_hist [_Py_UOP_HIST_SIZE ];
124
124
uint64_t trace_run_length_hist [_Py_UOP_HIST_SIZE ];
@@ -128,7 +128,7 @@ typedef struct _optimization_stats {
128
128
uint64_t optimizer_failure_reason_no_memory ;
129
129
uint64_t remove_globals_builtins_changed ;
130
130
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 ];
132
132
} OptimizationStats ;
133
133
134
134
typedef struct _rare_event_stats {
0 commit comments