10000 GH-116422: Tier2 hot/cold splitting by markshannon · Pull Request #116813 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

GH-116422: Tier2 hot/cold splitting #116813

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 31 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
9a4879d
Subdivide uop instruction into deopt, exit and error targets
markshannon Mar 12, 2024
b6b6426
Pass length of trace around.
markshannon Mar 12, 2024
20a7afe
Hot cold splitting. Work in progress
markshannon Mar 12, 2024
801062d
Further progress on hot-cold- splitting
markshannon Mar 12, 2024
53b90bc
Change error exit code to fix length. All test passing for T2 interpr…
markshannon Mar 14, 2024
aecdfc2
Do not allow eval breaker and jumps in same T2 micro-op
markshannon Mar 14, 2024
d365f58
Add JIT support
markshannon Mar 14, 2024
814d0fc
Merge branch 'main' into tier2-hot-cold-splitting
markshannon Mar 14, 2024
97428fa
Revert unneeded change
markshannon Mar 14, 2024
3c2154f
Add missing return annotation
markshannon Mar 14, 2024
a74756d
Better formatting
markshannon Mar 14, 2024
817a590
Fix assert
markshannon Mar 14, 2024
197abba
Merge branch 'main' into tier2-hot-cold-splitting
markshannon Mar 14, 2024
9d0d03c
EXIT_IF does not implies DEOPT_IF
10000 markshannon Mar 15, 2024
79ec8ef
Don't overflow the trace buffer
markshannon Mar 15, 2024
1dc1207
Merge branch 'main' into tier2-hot-cold-splitting
markshannon Mar 15, 2024
70b0ff5
Make sure COLD_EXIT has correct uop instruction format.
markshannon Mar 19, 2024
9cfa212
Merge branch 'main' into tier2-hot-cold-splitting
markshannon Mar 19, 2024
96941be
Merge branch 'main' into tier2-hot-cold-splitting
markshannon Mar 19, 2024
c19a18a
Remove NOPs before interpreting in T2.
markshannon Mar 19, 2024
7ab86e2
Rename _PyUop_Popped
markshannon Mar 20, 2024
fa5d14b
Address review comments
markshannon Mar 20, 2024
5217c12
Add comment
markshannon Mar 20, 2024
43ba205
Rename and move macros
markshannon Mar 20, 2024
3c4869b
Patch error jumps
markshannon Mar 20, 2024
b324933
Make assert a fatal error
markshannon Mar 20, 2024
71a2cae
Rename analyzer attributes for clarity
markshannon Mar 20, 2024
3f5dc4d
Remove redundant macros
markshannon Mar 20, 2024
6644e66
Merge branch 'main' into tier2-hot-cold-splitting
markshannon Mar 22, 2024
151db6a
Address code review
markshannon Mar 25, 2024
37627d3
Merge branch 'main' into tier2-hot-cold-splitting
markshannon Mar 25, 2024
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
Change error exit code to fix length. All test passing for T2 interpr…
…eter
  • Loading branch information
markshannon committed Mar 14, 2024
commit 53b90bca7ec3340ae564ca8584136c137e91940b
11 changes: 6 additions & 5 deletions Include/cpython/optimizer.h
B5D2
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ typedef struct {

#define UOP_FORMAT_TARGET 0
#define UOP_FORMAT_EXIT 1
#define UOP_FORMAT_DEOPT 2
#define UOP_FORMAT_JUMP 2
#define UOP_FORMAT_UNUSED 3

typedef struct {
uint16_t opcode:14;
Expand All @@ -43,7 +44,7 @@ typedef struct {
struct {
union {
uint16_t exit_index;
uint16_t deopt_target;
uint16_t jump_target;
};
uint16_t error_target;
};
Expand All @@ -63,10 +64,10 @@ static inline uint16_t uop_get_exit_index(const _PyUOpInstruction *inst)
return inst->exit_index;
}

static inline uint16_t uop_get_deopt_target(const _PyUOpInstruction *inst)
static inline uint16_t uop_get_jump_target(const _PyUOpInstruction *inst)
{
assert(inst->format == UOP_FORMAT_DEOPT);
return inst->deopt_target;
assert(inst->format == UOP_FORMAT_JUMP);
return inst->jump_target;
}

static inline uint16_t uop_get_error_target(const _PyUOpInstruction *inst)
Expand Down
87 changes: 40 additions & 47 deletions Include/internal/pycore_opcode_metadata.h

Large diffs are not rendered by default.

199 changes: 98 additions & 101 deletions Include/internal/pycore_uop_ids.h

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

Loading
0