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

Replace libffi/aarch64 with the latest version in GitHub #16252

Conversation

ChengJin01
Copy link
Contributor

The changes aim to resolve the libffi related issue detected on jtreg FFI downcall & upcall
tests suites by replacing the outdated version on Aarch64 with the latest version in Github at
https://github.com/libffi/libffi/tree/master/src/aarch64 to better support the downcall & upcall
with struct in JEP389/424(Foreign Linker API) which is part of the Panama project.

The latest committed SHA: c6dc125afba294b9b9613392c492ae18df3ede84

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

The changes aim to resolve the libffi related
issue detected on jtreg FFI downcall & upcall
tests suites by replacing the outdated version
on Aarch64 with the latest version in Github at
https://github.com/libffi/libffi/tree/master/src/aarch64
to better support the downcall & upcall with
struct in JEP389/424(Foreign Linker API) which
is part of the Panama project.

The latest committed SHA: c6dc125afba294b9b9613392c492ae18df3ede84

Signed-off-by: ChengJin01 <jincheng@ca.ibm.com>
@ChengJin01
Copy link
Contributor Author

ChengJin01 commented Nov 2, 2022

Note:

  1. The changes(verified in internal builds & external builds) resolves the libffi specific issue detected in FFI Jtreg tests
    in downcall (e.g.https://github.com/ibmruntimes/openj9-openjdk-jdk19/blob/openj9/test/jdk/java/foreign/TestDowncallStack.java) to deal with the cases of complex combination of struct arguments in native via libffi.
  2. The changes mainly copy the latest code in libffi/aarch64 from github without modification (in which case no copyright is required) while the rest of files are partially updated with the latest code specific to Aarch64 so as to adapt to the existing settings in OpenJ9.

Reviewer: @pshipton, @gacholio
FYI: @tajila, @DanHeidinga, @dnakamura, @knn-k

@ChengJin01
Copy link
Contributor Author

ChengJin01 commented Nov 2, 2022

The following files are directly copied from https://github.com/libffi/libffi/tree/master/src/aarch64 and https://github.com/libffi/libffi/blob/master/src/tramp.c:

runtime/libffi/aarch64/ffi.c
runtime/libffi/aarch64/ffitarget.h
runtime/libffi/aarch64/internal.h
runtime/libffi/aarch64/sysv.S
runtime/libffi/tramp.c

plus our own setting with updated code specific to Aarch64.

runtime/libffi/preconf/xr64/fficonfig.h

So the copyright & line endings check at https://openj9-jenkins.osuosl.org/job/PullRequest-CopyrightCheck-OpenJ9/6979/console and https://openj9-jenkins.osuosl.org/job/PullRequest-LineEndingsCheck-OpenJ9/6966/console are not required in such case.

@ChengJin01 ChengJin01 added arch:aarch64 comp:vm project:panama Used to track Project Panama related work labels Nov 2, 2022
@pshipton
Copy link
Member

pshipton commented Nov 2, 2022

The changes aren't all specific to aarch64, did you test all the platforms?

@ChengJin01
Copy link
Contributor Author

The changes aren't all specific to aarch64, did you test all the platforms?

Yes, they were verified on all platforms.

@pshipton
Copy link
Member

pshipton commented Nov 2, 2022

Which Java versions were tested?

@ChengJin01
Copy link
Contributor Author

Which Java versions were tested?

Internal builds: Java8
External builds: Java11, 17 & 19.

@pshipton
Copy link
Member

pshipton commented Nov 2, 2022

I assume internal means IBM Java 8? You'd better try OpenJ9 Java 8 as well, just in case. Some of the compiler levels are different.

@ChengJin01
Copy link
Contributor Author

I assume internal means IBM Java 8?

Yes. It's IBM Java 8.

You'd better try OpenJ9 Java 8 as well, just in case. Some of the compiler levels are different.

Will launch personal builds to double-check.

@ChengJin01
Copy link
Contributor Author

External personal builds (OpenJ9 Java 8) on all supported platforms passed without libffi related issue.

@pshipton
Copy link
Member

pshipton commented Nov 3, 2022

jenkins test sanity xmac jdk8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch:aarch64 comp:vm project:panama Used to track Project Panama related work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants