summaryrefslogtreecommitdiffstats
path: root/Include/cpython/pystats.h
diff options
context:
space:
mode:
authorMichael Droettboom <mdboom@gmail.com>2024-03-21 17:27:46 (GMT)
committerGitHub <noreply@github.com>2024-03-21 17:27:46 (GMT)
commit50369e6c34d05222e5a0ec9443a9f7b230e83112 (patch)
treedb917d49c0ab14cb31520715390a10a1247e73ba /Include/cpython/pystats.h
parent617158e07811edfd6fd552a3d84b0beedd8f1d18 (diff)
downloadcpython-50369e6c34d05222e5a0ec9443a9f7b230e83112.zip
cpython-50369e6c34d05222e5a0ec9443a9f7b230e83112.tar.gz
cpython-50369e6c34d05222e5a0ec9443a9f7b230e83112.tar.bz2
gh-116996: Add pystats about _Py_uop_analyse_and_optimize (GH-116997)
Diffstat (limited to 'Include/cpython/pystats.h')
-rw-r--r--Include/cpython/pystats.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/Include/cpython/pystats.h b/Include/cpython/pystats.h
index 887fbbe..5bf7bac 100644
--- a/Include/cpython/pystats.h
+++ b/Include/cpython/pystats.h
@@ -19,6 +19,8 @@
// Define _PY_INTERPRETER macro to increment interpreter_increfs and
// interpreter_decrefs. Otherwise, increment increfs and decrefs.
+#include "pycore_uop_ids.h"
+
#ifndef Py_CPYTHON_PYSTATS_H
# error "this header file must not be included directly"
#endif
@@ -116,7 +118,7 @@ typedef struct _optimization_stats {
uint64_t recursive_call;
uint64_t low_confidence;
uint64_t executors_invalidated;
- UOpStats opcode[512];
+ UOpStats opcode[MAX_UOP_ID];
uint64_t unsupported_opcode[256];
uint64_t trace_length_hist[_Py_UOP_HIST_SIZE];
uint64_t trace_run_length_hist[_Py_UOP_HIST_SIZE];
@@ -124,6 +126,9 @@ typedef struct _optimization_stats {
uint64_t optimizer_attempts;
uint64_t optimizer_successes;
uint64_t optimizer_failure_reason_no_memory;
+ uint64_t remove_globals_builtins_changed;
+ uint64_t remove_globals_incorrect_keys;
+ uint64_t error_in_opcode[MAX_UOP_ID];
} OptimizationStats;
typedef struct _rare_event_stats {