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

Update FFI specific code for compilation in JDK21 #598

Conversation

ChengJin01
Copy link

The changes update FFI specific code by disabling/removing
part of our code to pass the compilation in JDK21.

Note:
The modifications in code are based on the new APIs in JDK21 & JEP442
as mentioned at eclipse-openj9/openj9#16951.

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

Dmitry Cherepanov and others added 20 commits April 27, 2023 07:06
…GraphicsPrimitiveMgr

Reviewed-by: serb, aivanov
…view)

Co-authored-by: Maurizio Cimadamore <mcimadamore@openjdk.org>
Co-authored-by: Jorn Vernee <jvernee@openjdk.org>
Co-authored-by: Paul Sandoz <psandoz@openjdk.org>
Co-authored-by: Feilong Jiang <fjiang@openjdk.org>
Co-authored-by: Per Minborg <pminborg@openjdk.org>
Reviewed-by: erikj, jvernee, vlivanov, psandoz
Reviewed-by: clanger, mbaesken
Reviewed-by: epeter, jbhateja, thartmann
… statically linking JDK/VM natives with standard launcher

Reviewed-by: alanb
Reviewed-by: serb, azvegint
…erflowException where IndexOutOfBoundsException expected

Reviewed-by: alanb
…anguage locale.

Reviewed-by: jlu, iris, joehw
Copied j9cfg.h & omrcfg.h into
$(SUPPORT_OUTPUTDIR)/modules_include/java.base.

Signed-off-by: Jason Feng <fengj@ca.ibm.com>
Recognize OpenJ9 flags in openjdk jcl natives
Signed-off-by: Jason Feng <fengj@ca.ibm.com>
Conflicts:
	src/java.base/share/classes/java/lang/foreign/VaList.java
	src/java.base/share/classes/jdk/internal/foreign/CABI.java
	src/java.base/share/classes/jdk/internal/foreign/SystemLookup.java
	src/java.base/share/classes/jdk/internal/foreign/abi/AbstractLinker.java
	src/java.base/share/classes/jdk/internal/foreign/abi/SharedUtils.java
	src/java.base/share/classes/jdk/internal/foreign/abi/aarch64/CallArranger.java
	src/java.base/share/classes/jdk/internal/foreign/abi/aarch64/windows/WindowsAArch64VaList.java
	src/java.base/share/classes/jdk/internal/foreign/abi/riscv64/linux/LinuxRISCV64CallArranger.java
	src/java.base/share/classes/jdk/internal/foreign/abi/riscv64/linux/LinuxRISCV64VaList.java
	src/java.base/share/classes/jdk/internal/foreign/abi/x64/sysv/CallArranger.java
	src/java.base/share/classes/jdk/internal/foreign/abi/x64/windows/CallArranger.java
	test/jdk/java/foreign/NativeTestHelper.java
	test/jdk/java/foreign/TestClassLoaderFindNative.java
	test/jdk/java/foreign/TestVarArgs.java
	test/jdk/java/foreign/callarranger/platform/PlatformLayouts.java
	test/jdk/java/foreign/valist/VaListTest.java
	test/jdk/java/text/testlib/IntlTest.java

Modified:
	src/java.base/share/classes/jdk/internal/foreign/Utils.java

Signed-off-by: Jason Feng <fengj@ca.ibm.com>
Signed-off-by: Jason Feng <fengj@ca.ibm.com>
@ChengJin01
Copy link
Author

ChengJin01 commented May 5, 2023

Note:

  1. The PR is built on the top of Merge master HEAD into openj9-staging #595.
  2. All VaList related code are removed as required in JEP442 at JEP 442: Foreign Function & Memory API (Third Preview) eclipse-openj9/openj9#16951.
  3. The PR must be merged along with the disabled code in OpenJ9 at Disable FFI specific code for compilation in JDK21 eclipse-openj9/openj9#17352.

@ChengJin01
Copy link
Author

Reviewer: @keithc-ca
FYI: @tajila, @pshipton

@ChengJin01 ChengJin01 force-pushed the ffi_update_code_for_compilation_jdk21 branch 2 times, most recently from 676c35e to e6a2173 Compare May 29, 2023 16:29
Note:
The modifications in code are based on the new APIs in JDK21 & JEP442
as mentioned at eclipse-openj9/openj9#16951.

Signed-off-by: ChengJin01 <jincheng@ca.ibm.com>
@ChengJin01 ChengJin01 force-pushed the ffi_update_code_for_compilation_jdk21 branch from e6a2173 to 50ee730 Compare May 29, 2023 16:36
@keithc-ca
Copy link
Member

Jenkins compile all jdknext depends eclipse-openj9/openj9#17352

@ChengJin01
Copy link
Author

ChengJin01 commented May 29, 2023

The compilation failure was detected at https://openj9-jenkins.osuosl.org/job/Build_JDKnext_x86-64_linux_Personal/66/consoleText and https://openj9-jenkins.osuosl.org/job/Build_JDKnext_s390x_linux_Personal/88/consoleText due to the missing method clearInetAddressCache as follows:

[2023-05-29T21:02:15.177Z] /home/jenkins/workspace/Build_JDKnext_x86-64_linux_Personal/build/linux-x86_64-server-release/support/j9jcl/openj9.criu/share/classes/org/eclipse/openj9/criu/CRIUSupport.java:624: error: cannot find symbol
[2023-05-29T21:02:15.177Z] 		SharedSecrets.getJavaNetInetAddressAccess().clearInetAddressCache();
[2023-05-29T21:02:15.177Z] 		                                           ^
[2023-05-29T21:02:15.177Z]   symbol:   method clearInetAddressCache() <--------------------
[2023-05-29T21:02:15.177Z]   location: interface JavaNetInetAddressAccess
[2023-05-29T21:02:15.177Z] 1 error

which was introduced recently via #604 which was not yet added to the openj9-staging branch.

@JasonFengJ9, could you help add your changes at #604 to your branch at https://github.com/JasonFengJ9/openj9-openjdk-jdk/tree/mergetmp? I will rebase with your updated code from there.

@keithc-ca
Copy link
Member

@ChengJin01 It might be simpler to just cherry-pick f68f90b into your branch.

@JasonFengJ9
Copy link
Member

It might be simpler to just cherry-pick f68f90b into your branch.

Agreed, @ChengJin01 let me know if the initial merging PR rebase is still needed.

@ChengJin01
Copy link
Author

ChengJin01 commented May 30, 2023

It might be simpler to just cherry-pick f68f90b into your branch.

Agreed, @ChengJin01 let me know if the initial merging PR rebase is still needed.

It doesn't help as my branch was created on top of https://github.com/JasonFengJ9/openj9-openjdk-jdk/tree/mergetmp in which case the expected changes at f68f90b don't show up in the history/annotation list for cherry-pick.

@JasonFengJ9
Copy link
Member

It doesn't help as my branch was created on top of https://github.com/JasonFengJ9/openj9-openjdk-jdk/tree/mergetmp in which case the expected changes at f68f90b don't show up in the history/annotation list for cherry-pick.

You might pull latest openj9 branch which contains the commit in question, and ensure its history is visible for cherry-pick.

Added InetAddress.clearInetAddressCache() to be invoked by CRIU
post-restore hook via JavaNetInetAddressAccess().

Signed-off-by: Jason Feng <fengj@ca.ibm.com>
@ChengJin01
Copy link
Author

ChengJin01 commented May 30, 2023

I've cherry-picked the changes at f68f90b#diff-bcf494d3974af1421572e5bf8d544e4949a90eacb34c4fcbc4e4668a0a89da6b from the openj9 branch with my second remote.

@keithc-ca
Copy link
Member

Jenkins compile all jdknext depends eclipse-openj9/openj9#17352

@keithc-ca keithc-ca merged commit 1bac2ab into ibmruntimes:openj9-staging May 30, 2023
tajila pushed a commit to tajila/openj9-openjdk-jdk that referenced this pull request Mar 27, 2024
Fix race condition when creating the native pointer for an EC key
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.