Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions 3 Include/cpython/pystate.h
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,9 @@ struct _ts {

PyObject *current_executor;

/* Internal to the JIT */
struct _PyExitData *jit_exit;

uint64_t dict_global_version;

/* Used to store/retrieve `threading.local` keys/values for this thread */
Expand Down
1 change: 1 addition & 0 deletions 1 Include/internal/pycore_interp_structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -943,6 +943,7 @@ struct _is {
bool jit;
struct _PyExecutorObject *executor_list_head;
struct _PyExecutorObject *executor_deletion_list_head;
struct _PyExecutorObject *cold_executor;
int executor_deletion_list_remaining_capacity;
size_t trace_run_counter;
_rare_events rare_events;
Expand Down
15 changes: 14 additions & 1 deletion 15 Include/internal/pycore_optimizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@ typedef struct {
#endif
} _PyUOpInstruction;

typedef struct {
typedef struct _PyExitData {
uint32_t target;
uint16_t index;
_Py_BackoffCounter temperature;
struct _PyExecutorObject *executor;
} _PyExitData;
Expand Down Expand Up @@ -354,6 +355,16 @@ PyAPI_FUNC(PyObject *) _Py_uop_symbols_test(PyObject *self, PyObject *ignored);

PyAPI_FUNC(int) _PyOptimizer_Optimize(_PyInterpreterFrame *frame, _Py_CODEUNIT *start, _PyExecutorObject **exec_ptr, int chain_depth);

static inline _PyExecutorObject *_PyExecutor_FromExit(_PyExitData *exit)
{
_PyExitData *exit0 = exit - exit->index;
return (_PyExecutorObject *)(((char *)exit0) - offsetof(_PyExecutorObject, exits));
}

extern _PyExecutorObject *_PyExecutor_GetColdExecutor(void);

PyAPI_FUNC(void) _PyExecutor_ClearExit(_PyExitData *exit);

static inline int is_terminator(const _PyUOpInstruction *uop)
{
int opcode = uop->opcode;
Expand All @@ -363,6 +374,8 @@ static inline int is_terminator(const _PyUOpInstruction *uop)
);
}

extern void _PyExecutor_Free(_PyExecutorObject *self);

PyAPI_FUNC(int) _PyDumpExecutors(FILE *out);
#ifdef _Py_TIER2
extern void _Py_ClearExecutorDeletionList(PyInterpreterState *interp);
Expand Down
Loading
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.