Skip to content
This repository has been archived by the owner on Dec 13, 2024. It is now read-only.

[Aarch64/FFI] Remove static from arrangeDowncall() & arrangeUpcall() #67

Conversation

ChengJin01
Copy link

The changes remove the static keyword from arrangeDowncall()
and arrangeUpcall() in CallArranger to adapt to the existing setting
in OpenJDK intended for Aarch64.

Signed-off-by: ChengJin01 jincheng@ca.ibm.com

The changes remove the static keyword from arrangeDowncall() and
arrangeUpcall() in CallArranger to adapt to the existing setting
in OpenJDK intended for Aarch64.

Signed-off-by: ChengJin01 <jincheng@ca.ibm.com>
@ChengJin01 ChengJin01 force-pushed the jep424_remove_static_downcall_upcall_callarranger_jdk19 branch from 774a518 to b89fae3 Compare February 3, 2023 17:41
@ChengJin01
Copy link
Author

ChengJin01 commented Feb 3, 2023

As explained at ibmruntimes/openj9-openjdk-jdk20#12 (comment) plus the response from Oracle at https://mail.openjdk.org/pipermail/panama-dev/2023-February/018496.html

The AArch64 CallArranger has several different subclasses (for different OSes). 
The arrangeDowncall/arrangeUpcall method calls (indirectly through getBindings)
several overridden instance methods in these  subclasses (see the `abstract` methods
in the AArch64 CallArranger), so  it has to be non-static.

For the x64 implementations of CallArranger we don't have any subclasses 
of CallArranger, so there the method can be static.

we should follow the existing pattern in OpenJDK as they refactored their FFI framework with static removed from these two methods in CallArranger on Aarch64 since JDK18, given we already removed them in JDK20 at ibmruntimes/openj9-openjdk-jdk20#12.

Note: there is no change required in OpenJ9 as everything is already set up correctly in there to deal with the case. That being said, their work on Aarch64 has no impact on our code in OpenJ9 at this point.

@ChengJin01
Copy link
Author

The tiny changes are verified in personal builds on Aarch64 with all FFI test suites passed.

Reviewer: @tajila
FYI: @pshipton

@tajila
Copy link
Member

tajila commented Feb 9, 2023

jenkins test sanity alinux64 jdk19

@tajila tajila merged commit fc5b267 into ibmruntimes:openj9 Feb 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants