Revert "Move observability-relevant structure fields to the top" (#105512)

This commit is contained in:
Pablo Galindo Salgado 2023-06-08 16:59:38 +01:00 committed by GitHub
parent a8eb7372ee
commit 6a8b862357
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 53 additions and 65 deletions

View file

@ -84,6 +84,13 @@ typedef struct pyruntimestate {
to access it, don't access it directly. */
_Py_atomic_address _finalizing;
struct _pymem_allocators allocators;
struct _obmalloc_global_state obmalloc;
struct pyhash_runtime_state pyhash_state;
struct _time_runtime_state time;
struct _pythread_runtime_state threads;
struct _signals_runtime_state signals;
struct pyinterpreters {
PyThread_type_lock mutex;
/* The linked list of interpreters, newest first. */
@ -102,24 +109,13 @@ typedef struct pyruntimestate {
using a Python int. */
int64_t next_id;
} interpreters;
unsigned long main_thread;
/* The fields above this line are declared as early as possible to
facilitate out-of-process observability tools. */
// XXX Remove this field once we have a tp_* slot.
struct _xidregistry {
PyThread_type_lock mutex;
struct _xidregitem *head;
} xidregistry;
struct _pymem_allocators allocators;
struct _obmalloc_global_state obmalloc;
struct pyhash_runtime_state pyhash_state;
struct _time_runtime_state time;
struct _pythread_runtime_state threads;
struct _signals_runtime_state signals;
unsigned long main_thread;
/* Used for the thread state bound to the current thread. */
Py_tss_t autoTSSkey;