8000 GH-133231: Add JIT utilities in `sys._jit` by brandtbucher · Pull Request #133233 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

GH-133231: Add JIT utilities in sys._jit #133233

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 17 commits into from
May 5, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Clean up the diff
  • Loading branch information
brandtbucher committed May 4, 2025
commit c5104b89e6650b038ab9851c51d679fb09b57bda
4 changes: 0 additions & 4 deletions Include/cpython/pystate.h
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,6 @@ struct _ts {
*/
PyObject *threading_local_sentinel;
_PyRemoteDebuggerSupport remote_debugger_support;

// Any frame between the topmost frame where the JIT is currently active,
// and the interpreter entry frame below it (used by sys._jit.is_active):
struct _PyInterpreterFrame *jit_entry;
};

/* other API */
Expand Down
9 changes: 0 additions & 9 deletions Python/bytecodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -1202,9 +1202,6 @@ dummy_func(
LOAD_IP(frame->return_offset);
res = temp;
LLTRACE_RESUME_FRAME();
#if TIER_TWO
tstate->jit_entry = frame;
#endif
}

tier1 op(_RETURN_VALUE_EVENT, (val -- val)) {
Expand Down Expand Up @@ -1391,9 +1388,6 @@ dummy_func(
LOAD_IP(1 + INLINE_CACHE_ENTRIES_SEND);
value = PyStackRef_MakeHeapSafe(temp);
LLTRACE_RESUME_FRAME();
#if TIER_TWO
tstate->jit_entry = frame;
#endif
}

tier1 op(_YIELD_VALUE_EVENT, (val -- val)) {
Expand Down Expand Up @@ -4983,9 +4977,6 @@ dummy_func(
RELOAD_STACK();
res = PyStackRef_FromPyObjectStealMortal((PyObject *)gen);
LLTRACE_RESUME_FRAME();
#if TIER_TWO
tstate->jit_entry = frame;
#endif
}

inst(BUILD_SLICE, (args[oparg] -- slice)) {
Expand Down
1 change: 0 additions & 1 deletion Python/ceval.c
Original file line number Diff line number Diff line change
Expand Up @@ -1096,7 +1096,6 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int
/* Tier 2 interpreter state */
_PyExecutorObject *current_executor = NULL;
const _PyUOpInstruction *next_uop = NULL;
_PyInterpreterFrame *jit_entry;
#endif
#if Py_TAIL_CALL_INTERP
# if Py_STATS
Expand Down
2 changes: 0 additions & 2 deletions Python/ceval_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -381,8 +381,6 @@ do { \
tstate->current_executor = (PyObject *)_executor; \
next_uop = _executor->trace; \
assert(next_uop->opcode == _START_EXECUTOR); \
jit_entry = tstate->jit_entry; \
tstate->jit_entry = frame; \
goto enter_tier_two; \
} while (0)
#endif
Expand Down
9 changes: 0 additions & 9 deletions Python/executor_cases.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 0 additions & 15 deletions Python/generated_cases.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions Python/pystate.c
Original file line number Diff line number Diff line change
Expand Up @@ -1588,8 +1588,6 @@ init_threadstate(_PyThreadStateImpl *_tstate,

tstate->delete_later = NULL;

tstate->jit_entry = NULL;

llist_init(&_tstate->mem_free_queue);
llist_init(&_tstate->asyncio_tasks_head);
if (interp->stoptheworld.requested || _PyRuntime.stoptheworld.requested) {
Expand Down
Loading
0