Skip to content
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

AArch64: Use lastITable cache for interface call dispatching #18099

Merged
merged 1 commit into from
Sep 22, 2023

Conversation

Akira1Saitoh
Copy link
Contributor

This commit extends the existing interface call dispatching code of AArch64 codegen to exploit cached lastITable field in J9Class. buildInterfaceCall function is updated to generate The code for lastITable cache lookup after the code for checking the second PIC slot. Until the second slot is populated, lastITable cache lookup always fails to avoid filling PIC slots with infrequent call targets. See OpenJ9 #8390 for more details.
After the second slot is filled, the lastITable cache lookup is enabled by patching the b.al (branch always) instruction in the lookup code to b.ne (branch if not equal).
Recompilation code is also updated to properly handle the new instruction sequence generated by updated buildInterfaceCall function.

Resolves #8400
Signed-off-by: Akira Saitoh [email protected]

@Akira1Saitoh Akira1Saitoh force-pushed the aarch64LastITableCache branch from 87a5abe to cc0923f Compare September 8, 2023 04:34
@Akira1Saitoh Akira1Saitoh marked this pull request as ready for review September 8, 2023 08:25
@knn-k knn-k marked this pull request as draft September 11, 2023 00:09
@Akira1Saitoh Akira1Saitoh marked this pull request as ready for review September 11, 2023 03:33
@Akira1Saitoh Akira1Saitoh force-pushed the aarch64LastITableCache branch 2 times, most recently from cf3a5f5 to bccc30a Compare September 21, 2023 07:07
This commit extends the existing interface call dispatching code
of AArch64 codegen to exploit cached lastITable field in J9Class.
buildInterfaceCall function is updated to generate The code for
lastITable cache lookup after the code for checking the second PIC slot.
Until the second slot is populated, lastITable cache lookup always
fails to avoid filling PIC slots with infrequent call targets.
See OpenJ9 eclipse-openj9#8390 for more details.
After the second slot is filled, the lastITable cache lookup is
enabled by patching the b.al (branch always) instruction
in the lookup code to b.ne (branch if not equal).
Recompilation code is also updated to properly handle the new instruction
sequence generated by updated buildInterfaceCall function.

Resolves eclipse-openj9#8400
Signed-off-by: Akira Saitoh <[email protected]>
@knn-k
Copy link
Contributor

knn-k commented Sep 21, 2023

Jenkins test sanity alinux64,amac jdk17

@knn-k knn-k self-assigned this Sep 21, 2023
@knn-k
Copy link
Contributor

knn-k commented Sep 21, 2023

Jenkins test sanity amac jdk17

@knn-k
Copy link
Contributor

knn-k commented Sep 21, 2023

I launched amac build again because the previous one failed with the following error:

https://openj9-jenkins.osuosl.org/job/Build_JDK17_aarch64_mac_Personal/488/

[2023-09-21T07:27:10.564Z] Waiting for next available executor on ‘ci.role.build&&hw.arch.aarch64&&sw.os.mac’
ERROR: Cannot resume build because FlowNode 52 for FlowHead 1 could not be loaded. This is expected to happen when using the PERFORMANCE_OPTIMIZED durability setting and Jenkins is not shut down cleanly. Consider investigating to understand if Jenkins was not shut down cleanly or switching to the MAX_SURVIVABILITY durability setting which should prevent this issue in most cases.
Finished: FAILURE

@knn-k
Copy link
Contributor

knn-k commented Sep 22, 2023

The AArch64 Linux job failed in the same way as the macOS job above. It looks likes an infrastructural problem.

[2023-09-21T08:09:53.085Z] Starting building: Test_openjdk17_j9_sanity.functional_aarch64_linux_Personal #340
Creating placeholder flownodes because failed loading originals.
ERROR: Cannot resume build because FlowNode 110 for FlowHead 1 could not be loaded. This is expected to happen when using the PERFORMANCE_OPTIMIZED durability setting and Jenkins is not shut down cleanly. Consider investigating to understand if Jenkins was not shut down cleanly or switching to the MAX_SURVIVABILITY durability setting which should prevent this issue in most cases.
Finished: FAILURE

@knn-k
Copy link
Contributor

knn-k commented Sep 22, 2023

Jenkins test sanity alinux64 jdk17

@knn-k knn-k merged commit 51958b3 into eclipse-openj9:master Sep 22, 2023
@Akira1Saitoh Akira1Saitoh deleted the aarch64LastITableCache branch November 30, 2023 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exploit cached lastITable field on AArch64
2 participants