-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
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
markshannon
merged 31 commits into
python:main
from
faster-cpython:tier2-hot-cold-splitting
Mar 26, 2024
Merged
Changes from all commits
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 b6b6426
Pass length of trace around.
markshannon 20a7afe
Hot cold splitting. Work in progress
markshannon 801062d
Further progress on hot-cold- splitting
markshannon 53b90bc
Change error exit code to fix length. All test passing for T2 interpr…
markshannon aecdfc2
Do not allow eval breaker and jumps in same T2 micro-op
markshannon d365f58
Add JIT support
markshannon 814d0fc
Merge branch 'main' into tier2-hot-cold-splitting
markshannon 97428fa
Revert unneeded change
markshannon 3c2154f
Add missing return annotation
markshannon a74756d
Better formatting
markshannon 817a590
Fix assert
markshannon 197abba
Merge branch 'main' into tier2-hot-cold-splitting
markshannon 9d0d03c
EXIT_IF does not implies DEOPT_IF
markshannon 79ec8ef
Don't overflow the trace buffer
markshannon 1dc1207
Merge branch 'main' into tier2-hot-cold-splitting
markshannon 70b0ff5
Make sure COLD_EXIT has correct uop instruction format.
markshannon 9cfa212
Merge branch 'main' into tier2-hot-cold-splitting
markshannon 96941be
Merge branch 'main' into tier2-hot-cold-splitting
markshannon c19a18a
Remove NOPs before interpreting in T2.
markshannon 7ab86e2
Rename _PyUop_Popped
markshannon fa5d14b
Address review comments
markshannon 5217c12
Add comment
markshannon 43ba205
Rename and move macros
markshannon 3c4869b
Patch error jumps
markshannon b324933
Make assert a fatal error
markshannon 71a2cae
Rename analyzer attributes for clarity
markshannon 3f5dc4d
Remove redundant macros
markshannon 6644e66
Merge branch 'main' into tier2-hot-cold-splitting
markshannon 151db6a
Address code review
markshannon 37627d3
Merge branch 'main' into tier2-hot-cold-splitting
markshannon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still think that
format
is a property of the oparg, not the instruction itself. It is never correct to execute an instruction with the wrong format for its oparg, so it feels wrong to provide it separately here and allow them to drift out of sync (which I just spent a lot of time debugging yesterday). Bonus points for not needing a bitfield.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may never correct to execute an instruction with the wrong format, but this is primarily a format for optimization.
The "target" format is the correct format for all instructions during optimization.
If we care about tier 2 interpreter performance, we will want a different format for execution anyway.
What we could do is use different formats before and after
prepare_for_execution
, but I'd rather leave that for another PR.What's wrong with bitfields?