openj9 icon indicating copy to clipboard operation
openj9 copied to clipboard

Implement the functionalities of Foreign Linker API

Open ChengJin01 opened this issue 4 years ago • 0 comments

The issue is created to keep track of all PRs specific to the new feature in specified in JEP389 (Incubator) which also covers the failing jtreg test suites originally raised at https://github.com/eclipse/openj9/issues/11195 and JEP419 (Second Incubator) at https://github.com/eclipse-openj9/openj9/issues/14036.

[1] DownCall (1) JEP389 & JEP419 Phase 1: primitive type support on X86_64 & Aarch64 (ARM8 is Aarch64 as confirmed by Joe), which includes Linux/x86_64, Windows/x86_64 and Linux/Aarch64. https://github.com/ibmruntimes/openj9-openjdk-jdk16/pull/46 (JDK16) https://github.com/ibmruntimes/openj9-openjdk-jdk17/pull/36 (JDK17) https://github.com/ibmruntimes/openj9-openjdk-jdk/pull/314 (JDKnext) https://github.com/eclipse/openj9/pull/12413 (JEP389 in OpenJ9) and https://github.com/eclipse-openj9/openj9/pull/14077 (JEP419 in OpenJ9)

(2) JEP389 & JEP419 Phase 2 & 3: struct support on arguments and return value. https://github.com/eclipse-openj9/openj9/pull/13315 (OpenJ9) & https://github.com/eclipse/omr/pull/6287 (OMR)

(3) JEP389 & JEP419 Phase 4: support on PPC64/s390x, which includes Linux/PPC64LE, AIX/PPC64, and Linux/s390. https://github.com/ibmruntimes/openj9-openjdk-jdk16/pull/80 (JDK16) https://github.com/ibmruntimes/openj9-openjdk-jdk17/pull/23 (JDK17) https://github.com/ibmruntimes/openj9-openjdk-jdk18/pull/3 (JDK18) https://github.com/ibmruntimes/openj9-openjdk-jdk/pull/356 (JDK next)

[2] UpCall Design and Implementation of Foreign Linker API: Upcall at https://github.com/eclipse-openj9/openj9/issues/15068 PRs in OpenJ9: https://github.com/eclipse-openj9/openj9/pull/15069 (Part 1: creating the upcall stub in java) https://github.com/eclipse-openj9/openj9/pull/15307 (Part 1/JDK19+: creating the upcall stub in java) https://github.com/eclipse-openj9/openj9/pull/15083 (Part 1: creating the upcall stub in native) https://github.com/eclipse-openj9/openj9/pull/15308 (Part 2&3: generating thunk with the encoded signature) https://github.com/eclipse-openj9/openj9/pull/15309 (Part 4: dispatcher & the transition code) https://github.com/eclipse-openj9/openj9/pull/15310 (Enable downcall & upcall test suites for Java 17/18/19)

PRs in OpenJDK plus the resolved default library loading issue on AIX at https://github.com/eclipse-openj9/openj9/issues/13679: https://github.com/ibmruntimes/openj9-openjdk-jdk17/pull/112 (JDK17) https://github.com/ibmruntimes/openj9-openjdk-jdk18/pull/57 (JDK18) https://github.com/ibmruntimes/openj9-openjdk-jdk19/pull/5 & https://github.com/ibmruntimes/openj9-openjdk-jdk19/pull/26 (JDK19) https://github.com/ibmruntimes/openj9-openjdk-jdk/pull/457 & https://github.com/ibmruntimes/openj9-openjdk-jdk/pull/487 (JDKnext)

Thunk generation code on supported platforms: [1] Power (AIX & Linux): https://github.com/eclipse-openj9/openj9/pull/15308 [2] S390x (Linux): https://github.com/eclipse-openj9/openj9/pull/15596 [3] Aarch64 (Linux & macOS): https://github.com/eclipse-openj9/openj9/pull/15744 [4] x86_64 (Linux, Win and macOS): https://github.com/eclipse-openj9/openj9/pull/15926 [5] Function stubs on z/OS: https://github.com/eclipse-openj9/openj9/pull/15873

Bug fixes in jtreg tests: (1) https://github.com/eclipse-openj9/openj9/pull/15749 (support the session/scope in the same downcall handler in the multithreading environment) (2) https://github.com/eclipse-openj9/openj9/pull/15778 (support variadic functions in downcall)

[3] VaList APIs on Power & zLinux in OpenJDK (no extra code required in OpenJ9) https://github.com/ibmruntimes/openj9-openjdk-jdk/pull/488: Power (Linux & AIX) https://github.com/ibmruntimes/openj9-openjdk-jdk19/pull/27: Power (Linux & AIX)

Note: the VaList APIs on x86_64 and Aarch64 is already offered in OpenJDK.

FYI: @tajila, @pshipton, @DanHeidinga

ChengJin01 avatar Apr 12 '21 04:04 ChengJin01