Skip to content

gh-106140: Reorder some more fields to facilitate out-of-process inspection #106148

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions Include/internal/pycore_interp.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,19 @@ struct _is {
basis. Also see _PyRuntimeState regarding the various mutex fields.
*/

/* The per-interpreter GIL, which might not be used. */
struct _gil_runtime_state _gil;

// Dictionary of the sys module
PyObject *sysdict;

// Dictionary of the builtins module
PyObject *builtins;

struct _ceval_state ceval;

struct _import_state imports;

/* The per-interpreter GIL, which might not be used. */
struct _gil_runtime_state _gil;

/* ---------- IMPORTANT ---------------------------
The fields above this line are declared as early as
possible to facilitate out-of-process observability
Expand Down Expand Up @@ -147,12 +152,8 @@ struct _is {
struct _warnings_runtime_state warnings;
struct atexit_state atexit;

struct _ceval_state ceval;

struct _obmalloc_state obmalloc;

struct _import_state imports;

PyObject *audit_hooks;
PyType_WatchCallback type_watchers[TYPE_MAX_WATCHERS];
PyCode_WatchCallback code_watchers[CODE_MAX_WATCHERS];
Expand Down