-
Notifications
You must be signed in to change notification settings - Fork 5.8k
8352437: Support --add-exports with -XX:+AOTClassLinking #24124
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
8352437: Support --add-exports with -XX:+AOTClassLinking #24124
Conversation
👋 Welcome back iklam! A progress list of the required criteria for merging this PR into |
@iklam This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 60 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
Is the motivation tests or code that is making use of JDK internals? No objection to the change of course, I'm curious why we are doing this. |
The motivation is for both testing (e.g., expose the While the use of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code changes look clean. I just have two minor comments on the tests.
@@ -33,7 +33,6 @@ | |||
import jdk.test.lib.util.FileUtils; | |||
import jdk.test.lib.cds.CDSJarUtils.JarOptions; | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file has no change other than the above blank line deletion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
// (4) Dump = specified twice, Run = specified twice (but in different order) | ||
// Should still be able to use FMG (values are sorted by CDS). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about add another test case where the values are specified in the same order?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
The parent pull request that this pull request depends on has now been integrated and the target branch of this pull request has been updated. This means that changes from the dependent pull request can start to show up as belonging to this pull request, which may be confusing for reviewers. To remedy this situation, simply merge the latest changes from the new target branch into this pull request by running commands similar to these in the local repository for your personal fork: git checkout 8352437-aot-class-linking-incompatible-with-add-exports
git fetch https://git.openjdk.org/jdk.git master
git merge FETCH_HEAD
# if there are conflicts, follow the instructions given by git merge
git commit -m "Merge master"
git push |
@iklam this pull request can not be integrated into git checkout 8352437-aot-class-linking-incompatible-with-add-exports
git fetch https://git.openjdk.org/jdk.git master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes and cleanup look good! Thanks!
Thanks @calvinccheung and @matias9927 for the review |
Going to push as commit 096e70d.
Your commit was automatically rebased without conflicts. |
-XX:+AOTClassLinking
requires the CDS archived full module graph (FMG).--add-export
is specified, FMG is disabled, so AOT caches created with-XX:+AOTClassLinking
cannot be loaded.--add-export
flags as specified across the training/assembly/production phases, the FMG can be used, so we can use so AOT caches created with-XX:+AOTClassLinking
.The change itself is straight-forward: just remember the
--add-export
flags specified during AOT cache creation, and check the exact same ones are used during the production run.I did a fair amount of refactoring to change the "exact options specified" checks in modules.cpp, so more such options can be easily added in the future (we need to handle
--add-reads
and--add-opens
in future RFEs).(Note: this PR depends on #24122 )
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/24124/head:pull/24124
$ git checkout pull/24124
Update a local copy of the PR:
$ git checkout pull/24124
$ git pull https://git.openjdk.org/jdk.git pull/24124/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 24124
View PR using the GUI difftool:
$ git pr show -t 24124
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/24124.diff
Using Webrev
Link to Webrev Comment