-
-
Notifications
You must be signed in to change notification settings - Fork 33.6k
GH-112354: Initial implementation of warm up on exits and trace-stitching #114142
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 16 commits
1975b4c
9fb97f7
f9aa235
1288258
7c6267a
55c48e8
8b3c2e0
92a3b61
e3def48
87e544b
2172d68
4448793
c70f12f
d73fe0a
5c8f0bd
140486b
3362c93
63fe653
b0991a7
625bce2
e191fd7
941a14c
cfd3285
1025495
171dad7
e6ca3fe
308b2a7
518143e
9d8cab8
bf07dad
19b6b84
c959e8f
f393ba5
bd66b01
fe75484
3d0110c
de93130
77a6740
0a61d29
b3e306d
8f3aa33
7c84967
8ee6710
f37d7fc
1f8967d
8e4c601
4eb2cfc
ebe804f
c38d4e8
830eb4e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,12 +36,29 @@ typedef struct { | |
| uint64_t operand; // A cache entry | ||
| } _PyUOpInstruction; | ||
|
|
||
| typedef struct _exit_data { | ||
| uint32_t target; | ||
| int16_t temperature; | ||
| struct _PyExecutorObject *executor; | ||
| } _PyExitData; | ||
|
|
||
| typedef struct _PyExecutorObject { | ||
| PyObject_VAR_HEAD | ||
| const _PyUOpInstruction *trace; | ||
| _PyVMData vm_data; /* Used by the VM, but opaque to the optimizer */ | ||
| _PyUOpInstruction trace[1]; | ||
| uint32_t exit_count; | ||
| uint32_t code_size; | ||
| _PyExitData exits[1]; | ||
| } _PyExecutorObject; | ||
|
|
||
| typedef struct _cold_exit { | ||
| _PyExecutorObject base; | ||
| _PyUOpInstruction uop; | ||
| } _PyColdExitObject; | ||
|
|
||
|
|
||
markshannon marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| extern _PyColdExitObject Py_FatalErrorExecutor; | ||
|
||
|
|
||
| typedef struct _PyOptimizerObject _PyOptimizerObject; | ||
|
|
||
| /* Should return > 0 if a new executor is created. O if no executor is produced and < 0 if an error occurred. */ | ||
|
|
@@ -72,7 +89,7 @@ PyAPI_FUNC(_PyOptimizerObject *) PyUnstable_GetOptimizer(void); | |
| PyAPI_FUNC(_PyExecutorObject *) PyUnstable_GetExecutor(PyCodeObject *code, int offset); | ||
|
|
||
| int | ||
| _PyOptimizer_Optimize(struct _PyInterpreterFrame *frame, _Py_CODEUNIT *start, PyObject **stack_pointer); | ||
| _PyOptimizer_Optimize(struct _PyInterpreterFrame *frame, _Py_CODEUNIT *start, PyObject **stack_pointer, _PyExecutorObject **exec_ptr); | ||
|
|
||
| extern _PyOptimizerObject _PyOptimizer_Default; | ||
|
|
||
|
|
||
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.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.