-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8359359: AArch64: share trampolines between static calls to the same method #25954
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
base: master
Are you sure you want to change the base?
Conversation
…method Modify the C2 compiler to share trampoline stubs between static calls that resolve to the same callee method. Since the relocation target for all static calls is initially set to the static call resolver stub, the call's target alone cannot be used to distinguish between different static method calls. Instead, trampoline stubs should be shared based on the actual callee. The `SharedTrampolineTest.java` was designed to verify the sharing of trampolines among static calls. However, due to imprecise log analysis, the test currently passes even when trampolines are not shared. Additionally, comments within the test suggest ambiguity regarding whether it was intended to assess trampoline sharing for static calls or runtime calls. To address these issues and eliminate ambiguity, this patch renames and updates the existing test. Furthermore, a new test is introduced, using the existing one as a foundation, to accurately evaluate trampoline sharing for both static and runtime calls.
👋 Welcome back mablakatov! A progress list of the required criteria for merging this PR into |
❗ This change is not yet ready to be integrated. |
@mikabl-arm The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
One thing that looks a little odd: why do you maintain two separate lists and two sets of trampoline stub handlers? |
Hi @theRealAph , thank you for taking a look. JIC, these are hash tables with (target address; list of requests (call site offsets)) as (k;v) pairs. I've considered unifying the two hash tables. The problem here is the keys. We need a way to distinguish between runtime call keys and static call keys as we iterate through the table. We could use We could use something like |
@theRealAph , I've tried the above and it seems to work as intended. Please let me know if you find that solution more suitable and I'll prepare a patch for submission. |
Sounds good. |
Modify the C2 compiler to share trampoline stubs between static calls that resolve to the same callee method. Since the relocation target for all static calls is initially set to the static call resolver stub, the call's target alone cannot be used to distinguish between different static method calls. Instead, trampoline stubs should be shared based on the actual callee.
The
SharedTrampolineTest.java
was designed to verify the sharing of trampolines among static calls. However, due to imprecise log analysis, the test currently passes even when trampolines are not shared. Additionally, comments within the test suggest ambiguity regarding whether it was intended to assess trampoline sharing for static calls or runtime calls. To address these issues and eliminate ambiguity, this patch renames and updates the existing test. Furthermore, a new test is introduced, using the existing one as a foundation, to accurately evaluate trampoline sharing for both static and runtime calls.This has passed tier1-3 and jcstress testing on AArch64.
Progress
Issue
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/25954/head:pull/25954
$ git checkout pull/25954
Update a local copy of the PR:
$ git checkout pull/25954
$ git pull https://git.openjdk.org/jdk.git pull/25954/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 25954
View PR using the GUI difftool:
$ git pr show -t 25954
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/25954.diff
Using Webrev
Link to Webrev Comment