GH-137959: Replace shim code in jitted code with a single trampoline function.#137961
Merged
markshannon merged 7 commits intopython:mainfrom Aug 21, 2025
Merged
GH-137959: Replace shim code in jitted code with a single trampoline function.#137961markshannon merged 7 commits intopython:mainfrom
markshannon merged 7 commits intopython:mainfrom
Conversation
Member
Author
|
Benchmark results show a hint of a speedup, but in the noise. No slowdown, though. |
Fidget-Spinner
approved these changes
Aug 20, 2025
Member
Fidget-Spinner
left a comment
There was a problem hiding this comment.
Some things I observed. Correct me if I'm wrong:
- This actually splits out the tier 2 interpreter from the tier 1 interpreter. Which is likely a significant saving for our tier 2 debug build time and tier 2 interpreter. Nice!
- The shim/trampoline is only compiled once lazily and reused across the whole runtime. Then reused across all JIT functions. We currently do two jumps (one into the shim/trampoline, one into the exec->jit_code). You need to lock this with a mutex in case multiple threads try to compile the shim at the same time.
If my understanding above is correct, then this is alright to me.
Member
Author
That is all correct. I'll add a comment explaining it. |
Member
|
Nice, sorry I wasn't able to review in time, but it looks mostly good (love the unification of the two JIT execution engines). Two notes:
|
This was referenced Oct 18, 2025
This was referenced Nov 13, 2025
This was referenced Dec 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.
Uh oh!
There was an error while loading. Please reload this page.