gh-130956: emit AArch64 trampolines only for long jumps#131041
Merged
brandtbucher merged 3 commits intopython:mainfrom Mar 19, 2025
Merged
gh-130956: emit AArch64 trampolines only for long jumps#131041brandtbucher merged 3 commits intopython:mainfrom
brandtbucher merged 3 commits intopython:mainfrom
Conversation
Emit the AArch64 trampoline only if the address is more than 27 bits range. Enable the PLT for Linux AArch64: without it no trampolines are emitted at all and symbols are referenced via the GOT.
diegorusso
commented
Mar 10, 2025
Tools/jit/_targets.py
Outdated
| # On aarch64 Linux, intrinsics were being emitted and this flag | ||
| # was required to disable them. | ||
| "-mno-outline-atomics", | ||
| "-fplt", |
Contributor
Author
There was a problem hiding this comment.
This is needed otherwise trampolines are not generated at all and everything is referenced via the GOT. if you prefer, we can have this as separate PR.
Member
There was a problem hiding this comment.
Yeah, this seems like this slows Linux down. Let's drop it.
ff2e45d to
efdef5f
Compare
brandtbucher
approved these changes
Mar 18, 2025
Member
brandtbucher
left a comment
There was a problem hiding this comment.
Yep, looks good!
Looks like it's ~0.4% slower on Linux, and ~0.8% faster on macOS (with 20-25% faster startup!). Maybe, given the results, we should roll back the new -fplt option for Linux? Otherwise, I think this makes sense to land.
brandtbucher
approved these changes
Mar 19, 2025
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Emit the AArch64 trampoline only if the address is more than 27 bits range.
Enable the PLT for Linux AArch64: without it no trampolines are emitted at all and symbols are referenced via the GOT.