https://github.com/python/cpython/commit/dd7f1130570d50461b2a0f81ab01c55b9ce93700
commit: dd7f1130570d50461b2a0f81ab01c55b9ce93700
branch: main
author: Pablo Galindo Salgado <pablog...@gmail.com>
committer: pablogsal <pablog...@gmail.com>
date: 2025-05-20T15:31:37Z
summary:

gh-115999: Add PyCodeObject.co_tlbc to the debug offsets (#134286)

Signed-off-by: Pablo Galindo <pablog...@gmail.com>

files:
M Include/internal/pycore_debug_offsets.h

diff --git a/Include/internal/pycore_debug_offsets.h 
b/Include/internal/pycore_debug_offsets.h
index 59d2c9d5377953..1a265c59ff8c08 100644
--- a/Include/internal/pycore_debug_offsets.h
+++ b/Include/internal/pycore_debug_offsets.h
@@ -52,9 +52,13 @@ extern "C" {
 #ifdef Py_GIL_DISABLED
 # define _Py_Debug_gilruntimestate_enabled offsetof(struct _gil_runtime_state, 
enabled)
 # define _Py_Debug_Free_Threaded 1
+# define _Py_Debug_code_object_co_tlbc offsetof(PyCodeObject, co_tlbc)
+# define _Py_Debug_interpreter_frame_tlbc_index offsetof(_PyInterpreterFrame, 
tlbc_index)
 #else
 # define _Py_Debug_gilruntimestate_enabled 0
 # define _Py_Debug_Free_Threaded 0
+# define _Py_Debug_code_object_co_tlbc 0
+# define _Py_Debug_interpreter_frame_tlbc_index 0
 #endif
 
 
@@ -109,6 +113,7 @@ typedef struct _Py_DebugOffsets {
         uint64_t localsplus;
         uint64_t owner;
         uint64_t stackpointer;
+        uint64_t tlbc_index;
     } interpreter_frame;
 
     // Code object offset;
@@ -123,6 +128,7 @@ typedef struct _Py_DebugOffsets {
         uint64_t localsplusnames;
         uint64_t localspluskinds;
         uint64_t co_code_adaptive;
+        uint64_t co_tlbc;
     } code_object;
 
     // PyObject offset;
@@ -265,6 +271,7 @@ typedef struct _Py_DebugOffsets {
         .localsplus = offsetof(_PyInterpreterFrame, localsplus), \
         .owner = offsetof(_PyInterpreterFrame, owner), \
         .stackpointer = offsetof(_PyInterpreterFrame, stackpointer), \
+        .tlbc_index = _Py_Debug_interpreter_frame_tlbc_index, \
     }, \
     .code_object = { \
         .size = sizeof(PyCodeObject), \
@@ -277,6 +284,7 @@ typedef struct _Py_DebugOffsets {
         .localsplusnames = offsetof(PyCodeObject, co_localsplusnames), \
         .localspluskinds = offsetof(PyCodeObject, co_localspluskinds), \
         .co_code_adaptive = offsetof(PyCodeObject, co_code_adaptive), \
+        .co_tlbc = _Py_Debug_code_object_co_tlbc, \
     }, \
     .pyobject = { \
         .size = sizeof(PyObject), \

_______________________________________________
Python-checkins mailing list -- python-checkins@python.org
To unsubscribe send an email to python-checkins-le...@python.org
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: arch...@mail-archive.com

Reply via email to