GH-104580: Don't cache eval breaker in interpreter (GH-104581)

Move eval-breaker to the front of the interpreter state.
This commit is contained in:
Mark Shannon 2023-05-18 10:08:33 +01:00 committed by GitHub
parent 662aede68b
commit 68b5f08b72
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 260 additions and 262 deletions

View file

@ -81,14 +81,14 @@ struct _pending_calls {
};
struct _ceval_state {
int recursion_limit;
struct _gil_runtime_state *gil;
int own_gil;
/* This single variable consolidates all requests to break out of
the fast path in the eval loop. */
_Py_atomic_int eval_breaker;
/* Request for dropping the GIL */
_Py_atomic_int gil_drop_request;
int recursion_limit;
struct _gil_runtime_state *gil;
int own_gil;
/* The GC is ready to be executed */
_Py_atomic_int gc_scheduled;
struct _pending_calls pending;

View file

@ -48,6 +48,7 @@ struct _Py_long_state {
*/
struct _is {
struct _ceval_state ceval;
PyInterpreterState *next;
uint64_t monitoring_version;
@ -92,7 +93,6 @@ struct _is {
struct _obmalloc_state obmalloc;
struct _ceval_state ceval;
struct _gc_runtime_state gc;
struct _import_state imports;