-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
GH-133231: Changes to executor management to support proposed sys._jit module
#133287
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
Changes from 1 commit
3a2ccda
46ef280
01ecf18
89e4668
2f42cb0
f938d68
a30e444
0b9dcb7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -359,7 +359,7 @@ _PyFrame_SetStackPointer(frame, stack_pointer) | |
| do { \ | ||
| OPT_STAT_INC(traces_executed); \ | ||
| _PyExecutorObject *_executor = (EXECUTOR); \ | ||
| assert(tstate->current_executor == _executor); \ | ||
| tstate->current_executor = (PyObject *)_executor; \ | ||
| jit_func jitted = _executor->jit_code; \ | ||
| /* Keep the shim frame alive via the executor: */ \ | ||
| Py_INCREF(_executor); \ | ||
|
|
@@ -378,7 +378,9 @@ do { \ | |
| #define GOTO_TIER_TWO(EXECUTOR) \ | ||
| do { \ | ||
| OPT_STAT_INC(traces_executed); \ | ||
| next_uop = (EXECUTOR)->trace; \ | ||
| _PyExecutorObject *_executor = (EXECUTOR); \ | ||
| tstate->current_executor = (PyObject *)_executor; \ | ||
| next_uop = _executor->trace; \ | ||
| assert(next_uop->opcode == _START_EXECUTOR); \ | ||
| goto enter_tier_two; \ | ||
| } while (0) | ||
|
|
@@ -387,6 +389,7 @@ do { \ | |
| #define GOTO_TIER_ONE(TARGET) \ | ||
| do \ | ||
| { \ | ||
| tstate->current_executor = NULL; \ | ||
| next_instr = (TARGET); \ | ||
| assert(tstate->current_executor == NULL); \ | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Minor: this seems redundant, given that we're setting it one line above. |
||
| OPT_HIST(trace_uop_execution_counter, trace_run_length_hist); \ | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -50,13 +50,16 @@ | |
| #define GOTO_TIER_TWO(EXECUTOR) \ | ||
| do { \ | ||
| OPT_STAT_INC(traces_executed); \ | ||
| jit_func_preserve_none jitted = (EXECUTOR)->jit_side_entry; \ | ||
| _PyExecutorObject *_executor = (EXECUTOR); \ | ||
| tstate->current_executor = (PyObject *)_executor; \ | ||
| jit_func_preserve_none jitted = _executor->jit_side_entry; \ | ||
| __attribute__((musttail)) return jitted(frame, stack_pointer, tstate); \ | ||
| } while (0) | ||
|
|
||
| #undef GOTO_TIER_ONE | ||
| #define GOTO_TIER_ONE(TARGET) \ | ||
| do { \ | ||
| tstate->current_executor = NULL; \ | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can either do this here, or in the second half of the |
||
| _PyFrame_SetStackPointer(frame, stack_pointer); \ | ||
| return TARGET; \ | ||
| } while (0) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.