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

[JEP424] Implement the Linker's downcall & upcall handler in JDKnext #457

Conversation

ChengJin01
Copy link

The changes aim to enable the Linker's downcall & upcall handler
to support primitives and struct by replacing DowncallLinker
& UpcallLinker with the equivalent implemented in OpenJ9.
In addition, the changes also include the code that handles
the default library loading on AIX.

Signed-off-by: Cheng Jin jincheng@ca.ibm.com

@ChengJin01
Copy link
Author

ChengJin01 commented Jun 13, 2022

The Java19 specific changes (downcall & upcall) in OpenJDK belong to the issue intended for the upcall work at #15068.
Note:

  1. the PR also includes the code that ignores the alignment check for double/float to ensure it works for double related struct on AIX in Java 19 (never used in Java 17 & 18).
  2. the PR depends on the java part in PR at [Part 1/JDK19] FFI Upcall: creating the upcall stub (java part) eclipse-openj9/openj9#15307 and the native code in Design and Implementation of Foreign Linker API: Upcall eclipse-openj9/openj9#15068.

Reviewer: @tajila
FYI: @DanHeidinga, @pshipton, @gacholio

@ChengJin01 ChengJin01 changed the title [JEP424]Implement the Linker's downcall & upcall handler [JEP424]Implement the Linker's downcall & upcall handler in Java19 Jun 13, 2022
@ChengJin01 ChengJin01 changed the title [JEP424]Implement the Linker's downcall & upcall handler in Java19 [JEP424] Implement the Linker's downcall & upcall handler in Java19 Jun 13, 2022
The changes aim to enable the Linker's downcall & upcall handler
to support primitives and struct by replacing DowncallLinker
& UpcallLinker with the equivalent implemented in OpenJ9.
In addition, the changes also include the code that handles
the default library loading on AIX.

Signed-off-by: Cheng Jin <jincheng@ca.ibm.com>
@ChengJin01 ChengJin01 changed the title [JEP424] Implement the Linker's downcall & upcall handler in Java19 [JEP424] Implement the Linker's downcall & upcall handler in JDKnext Jun 17, 2022
@ChengJin01 ChengJin01 force-pushed the jep424_enable_linker_downcall_upcall_jdknext branch from 70e8e4d to 1cd7ad2 Compare June 17, 2022 15:57
@tajila
Copy link
Member

tajila commented Jul 18, 2022

jenkins test sanity plinux jdknext

@tajila
Copy link
Member

tajila commented Jul 18, 2022

@ChengJin01 some compilation failures here

@ChengJin01
Copy link
Author

ChengJin01 commented Jul 18, 2022

@ChengJin01 some compilation failures here

@tajila, the code changes depend on the latest downcall & upcall java code in OpenJ9 at eclipse-openj9/openj9#15307 as I mentioned at eclipse-openj9/openj9#15307 (comment); otherwise, the compilation will pick up the code in OpenJDK rather than OpenJ9 and end up with failing failure on Jenkins (e.g.https://openj9-jenkins.osuosl.org/job/Build_JDKnext_ppc64le_linux_Personal/48/consoleText)

[2022-07-18T12:45:46.609Z] /home/jenkins/workspace/Build_JDKnext_ppc64le_linux_Personal/src/java.base/share/classes/jdk/internal/foreign/abi/aarch64/CallArranger.java:161: error: method getBoundMethodHandle in class DowncallLinker cannot be applied to given types;
[2022-07-18T12:45:46.609Z]         MethodHandle handle = DowncallLinker.getBoundMethodHandle(mt, cDesc); 
<--- The failure was caused by the mismatch of arguments in getBoundMethodHandle() in OpenJDK. 
[2022-07-18T12:45:46.609Z]                                             ^
[2022-07-18T12:45:46.609Z]   required: no arguments
[2022-07-18T12:45:46.609Z]   found:    MethodType,FunctionDescriptor
[2022-07-18T12:45:46.609Z]   reason: actual and formal argument lists differ in length

@tajila tajila merged commit 092e3e7 into ibmruntimes:openj9 Jul 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants