@@ -54,11 +54,13 @@ extern "C" {
54
54
# define _Py_Debug_Free_Threaded 1
55
55
# define _Py_Debug_code_object_co_tlbc offsetof(PyCodeObject, co_tlbc)
56
56
# define _Py_Debug_interpreter_frame_tlbc_index offsetof(_PyInterpreterFrame, tlbc_index)
57
+ # define _Py_Debug_interpreter_state_tlbc_generation offsetof(PyInterpreterState, tlbc_indices.tlbc_generation)
57
58
#else
58
59
# define _Py_Debug_gilruntimestate_enabled 0
59
60
# define _Py_Debug_Free_Threaded 0
60
61
# define _Py_Debug_code_object_co_tlbc 0
61
62
# define _Py_Debug_interpreter_frame_tlbc_index 0
63
+ # define _Py_Debug_interpreter_state_tlbc_generation 0
62
64
#endif
63
65
64
66
@@ -90,6 +92,7 @@ typedef struct _Py_DebugOffsets {
90
92
uint64_t gil_runtime_state_locked ;
91
93
uint64_t gil_runtime_state_holder ;
92
94
uint64_t code_object_generation ;
95
+ uint64_t tlbc_generation ;
93
96
} interpreter_state ;
94
97
95
98
// Thread state offset;
@@ -258,6 +261,7 @@ typedef struct _Py_DebugOffsets {
258
261
.gil_runtime_state_locked = offsetof(PyInterpreterState, _gil.locked), \
259
262
.gil_runtime_state_holder = offsetof(PyInterpreterState, _gil.last_holder), \
260
263
.code_object_generation = offsetof(PyInterpreterState, _code_object_generation), \
264
+ .tlbc_generation = _Py_Debug_interpreter_state_tlbc_generation, \
261
265
}, \
262
266
.thread_state = { \
263
267
.size = sizeof(PyThreadState), \
0 commit comments