Skip to content

Integrate OpenJCEPlus into Semeru OpenJDK #238

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

Merged
merged 1 commit into from
Dec 11, 2023

Conversation

taoliult
Copy link
Contributor

@taoliult taoliult commented Jul 18, 2023

Depends on eclipse-openj9/openj9#18544 being merged first.

Integrate the building of OpenJCEPlus with Semeru OpenJDK as a module "openjceplus". The java codes will be built with Semeru OpenJDK as a jmod, and the native codes will be built as a ".so" or ".dll" library.

The "bash get_source.sh" will download the OpenJCEPlus repo and also the ICC binaries which needed when building the OpenJCEPlus native codes.

Example:

bash get_source.sh -openjceplus-repo=[OpenJCEPlus repo] -openjceplus-branch=[OpenJCEPlus branch] -gskit-bin=[ICC binary tar file] -gskit-sdk-bin=[ICC SDK binary tar file] -gskit-credential=[Credential for downloading ICC]

bash configure --with-boot-jdk=[Boot JDK] --enable-openjceplus

Signed-off-by: Tao Liu [email protected]

@taoliult
Copy link
Contributor Author

@pshipton

It is a draft PR, please help to review, if the makefiles which we updated are correct.

And in the “closed/custom/Main-pre.gmk”, I put the native codes building “openjceplus-libs” under the “java.base-copy”, same as what the zOS team did when they integrated the OpenJCEPlus building with Semeru. But, since we add a new module “openjceplus”, so I am not sure if under the “java.base-copy” is still good, or do we need another, like “openjceplus-copy” to tigger the OpenJCEPlus native codes building. Please help to review and advise.

@taoliult
Copy link
Contributor Author

Copy link
Member

@keithc-ca keithc-ca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How are these to be tested externally? Is there a github repository that could be used?

@keithc-ca
Copy link
Member

While working with Java 17 might provide a more stable development environment, changes for the head stream, and jdk21 will be needed before this can be merged here.

@keithc-ca
Copy link
Member

Please address the copyright check failures.

@taoliult taoliult force-pushed the OpenJCEPlus branch 3 times, most recently from d8d25eb to 28b7e50 Compare July 26, 2023 21:57
@taoliult
Copy link
Contributor Author

@keithc-ca
For your question "How are these to be tested externally? Is there a github repository that could be used?".
Right now, we are still working on the public repo setup. So, for now, we just use our internal or private repo for the test purpose.

@taoliult taoliult force-pushed the OpenJCEPlus branch 4 times, most recently from d582785 to 7c24fe7 Compare October 17, 2023 14:26
@taoliult
Copy link
Contributor Author

@keithc-ca For the code reviews, some of them updated the codes, some of them replied the questions. Please help to review and advise.

@taoliult
Copy link
Contributor Author

@keithc-ca Please help to review and advise. Thanks.

@taoliult
Copy link
Contributor Author

taoliult commented Oct 30, 2023

@keithc-ca
I just updated this PR, by updating the Main.gmk for the OpenJCEPlus multi-platforms support. Right now, OpenJCEPlus supports 4 platforms, ppc64le_linux, ppc64_aix, x86-64_linux. Please help to review and advise. Thanks.

@taoliult taoliult force-pushed the OpenJCEPlus branch 5 times, most recently from 1e0ff01 to 09f5e80 Compare November 13, 2023 18:20
@taoliult taoliult marked this pull request as ready for review November 13, 2023 18:22
@taoliult taoliult force-pushed the OpenJCEPlus branch 3 times, most recently from 97cc6d5 to ebd0ba7 Compare December 3, 2023 15:50
@taoliult
Copy link
Contributor Author

taoliult commented Dec 3, 2023

Updated the codes in OpenJ9 PR eclipse-openj9/openj9#18544. Move the "/[IF OPENJCEPLUS_SUPPORT]/" exports to this extensions module-info.java.

Run the builds on the OpenJCEPlus not supported platforms, s390x_linux and aarch64_linux, links below. The builds look good, no openjceplus module generated and no exports to unknown module error.

https://hyc-runtimes-jenkins.swg-devops.com/view/OpenJ9%20-%20Personal/job/Pipeline-Build-Test-Personal/19593/
https://hyc-runtimes-jenkins.swg-devops.com/view/OpenJ9%20-%20Personal/job/Pipeline-Build-Test-Personal/19586/

@pshipton Please help to review and advise.

@pshipton
Copy link
Member

pshipton commented Dec 3, 2023

lgtm. @keithc-ca

Depends on eclipse-openj9/openj9#18544 being merged first.

Comment on lines 236 to 238
# Create OpenJCEPlus Java module folder
mkdir -p ./src/main/openjceplus/share/classes/
cp -r ./src/main/java/* ./src/main/openjceplus/share/classes/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't going to be pleasant for anyone actively working on OpenJCEPlus and the integration with openjdk. One should be able to modify any source files within OpenJCEPlus without manually managing the copies this creates. This makes it a more serious issue from my perspective.

Comment on lines +185 to +187
/*[IF OPENJCEPLUS_SUPPORT]*/
openjceplus,
/*[ENDIF] OPENJCEPLUS_SUPPORT */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be a priority to eliminate the use of internal classes by OpenJCEPlus.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@keithc-ca
Yes, we are working on the elimination of the use of the internal classes by OpenJCEPlus. But for the current phase, we still have to use those internal classes.
@jasonkatonica FYI.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The team faced a decision of maintaining 100k lines of code that was a duplicate of the sun internal classes or use some of the sun internal classes. A decision was made to use the sun internal classes. We are however in the long run planning on trying to find alternates and more and more external functions that could be used as an equivalent wherever possible.

This particular package is something we certainly plan on removing as there are many alternatives to the jdk.internal.logger package. It will however not be done in this phase of development.

@taoliult
Copy link
Contributor Author

taoliult commented Dec 7, 2023

@keithc-ca Codes updated according to code review, please help to review and advice. @jasonkatonica FYI.

@taoliult taoliult changed the title Integrate OpenJCEPlus into Semeru OpenJDK module openjceplus Integrate OpenJCEPlus into Semeru OpenJDK Dec 7, 2023
com_ibm_crypto_plus_provider_icc_NativeInterface.h)
$(MAKE) -C $(OPENJCEPLUS_TOPDIR)/src/main/native -f $(JGSKIT_MAKE) cleanAll

clean : openjceplus-clean
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The target clean-openjceplus already exists; it should depend upon openjceplus-clean:

clean-openjceplus : openjceplus-clean

(In turn, clean depends on clean-openjceplus.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@keithc-ca
I searched the OpenJDK codes but I did not find the target clean-openjceplus you mentioned. Could you tell us where this target clean-openjceplus defined?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@taoliult
Copy link
Contributor Author

taoliult commented Dec 8, 2023

Codes updated according to the code review, the x86 linux build looks good when building in my fyre VM. Committed the codes to run the builds on all the supported platforms. Once the builds are good, then I will update the comment for code review.

@taoliult
Copy link
Contributor Author

taoliult commented Dec 8, 2023

Build looks good in my x86 linux fyre VM. Commit the changes to run the builds on all the supported platforms.

@keithc-ca
Copy link
Member

After fixing the use of MixedPath, please squash and fix the commit message. Please only use ASCII quotes, (e.g. not “.so”) and put the "Signed-off-by:" line after a blank line at the end (not in the middle).

Integrate the building of OpenJCEPlus with Semeru OpenJDK as a
module "openjceplus". The java codes will be built with Semeru
OpenJDK as a jmod, and the native codes will be built as a ".so"
or ".dll" library.

Signed-off-by: Tao Liu <[email protected]>
@taoliult
Copy link
Contributor Author

taoliult commented Dec 8, 2023

@keithc-ca
MixedPath fixed, and the commits squashed as one commit, and also fix the commit message by using the ASCII quotes, and also put the "Signed-off-by:" at the end of the commit message. Right now, run the builds on Jenkins for all the supported platforms.

@keithc-ca keithc-ca requested a review from pshipton December 8, 2023 23:59
Copy link
Member

@keithc-ca keithc-ca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be used as a model for pull requests to newer versions, e.g. ibmruntimes/openj9-openjdk-jdk#710. Changes for newer versions should be merged first.

I added @pshipton as a reviewer so this and related PRs can proceed during my absence.

@taoliult
Copy link
Contributor Author

taoliult commented Dec 9, 2023

@keithc-ca Thanks so much for the review. I am working on the JDK next PR ibmruntimes/openj9-openjdk-jdk#710. Will update all the new changes from here to the JDK next PR.

@pshipton pshipton merged commit 5b2f439 into ibmruntimes:openj9 Dec 11, 2023
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.

4 participants