-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8349953: Avoid editing AOTConfiguration file in "make test JTREG=AOT_JDK=true" #23620
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
8349953: Avoid editing AOTConfiguration file in "make test JTREG=AOT_JDK=true" #23620
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 59 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 |
Webrevs
|
| // TODO: we should do more substantial work than just running with "--help". | ||
| // E.g., use javac to compile a program. | ||
| for (String tool : tools) { | ||
| ToolProvider t = ToolProvider.findFirst(tool) |
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.
| ToolProvider t = ToolProvider.findFirst(tool) | |
| ToolProvider t = ToolProvider.findFirst(tool) |
…necessary to have the definitions in a stand-alone file
erikj79
left a comment
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.
Thank you for helping cleaning this up and moving the compilation of the tool to build time and the test image. Added some more comments.
make/test/BuildJtregSetupAOT.gmk
Outdated
| SETUP_AOT_BASEDIR := $(TOPDIR)/test/jtreg_setup_aot | ||
| SETUP_AOT_SUPPORT := $(SUPPORT_OUTPUTDIR)/test/jtreg_setup_aot | ||
| SETUP_AOT_JAR := $(SETUP_AOT_SUPPORT)/jtregSetupAOT.jar | ||
| SETUP_AOT_CLASS := $(SETUP_AOT_SUPPORT)/classes/ExerciseJDKClasses.class |
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.
We do not encourage aligning assignments like this in the makefiles.
https://openjdk.org/groups/build/doc/code-conventions.html
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. I also fixed other places where we had such alignments.
make/test/BuildTestSetupAOT.gmk
Outdated
|
|
||
| IMAGES_TARGETS += $(COPY_SETUP_AOT) | ||
|
|
||
| build: $(TARGETS) |
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.
The target build is no longer the default target in this makefile, so this line is dead code unless you change the call in Main.gmk by setting TARGET := build. You can also just remove this line as the default target all gets setup to depend on $(TARGETS) anyway in MakeFileEnd.gmk.
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.
I removed this line and verified TestSetupAOT.class is still created inside the test image.
calvinccheung
left a comment
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.
Hotspot changes look good.
|
Thanks @erikj79 @calvinccheung for the review. |
|
Going to push as commit 0131c1b.
Your commit was automatically rebased without conflicts. |
When running HotSpot jtreg tests in the "AOT mode", for example:
Before this PR, in the test set up phase, we record several AOT configuration files by running a few separate Java tools (javac, javap, jlink, and jar), and then combine them together with sed, grep, sort and uniq:
jdk/make/RunTests.gmk
Lines 723 to 744 in adc3f53
After JDK-8348426, the AOT configuration file will change to a binary format and can no longer be edited this way. In preparation for JDK-8348426, we should change the "JTREG_AOT_JDK=true" set up to run a single Java program that accomplishes the same effect as the current implementation.
** Changes in this PR **
This PR combines the invocation of these Java tools into a single Java program, so we just have a single AOT configuration file. It also uses the
-XX:ExtraSharedClassListFileoption to include the default classlist from the JDK home directory,Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/23620/head:pull/23620$ git checkout pull/23620Update a local copy of the PR:
$ git checkout pull/23620$ git pull https://git.openjdk.org/jdk.git pull/23620/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 23620View PR using the GUI difftool:
$ git pr show -t 23620Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/23620.diff
Using Webrev
Link to Webrev Comment