8300829: Make CtwRunner available as an independent tool#13344
8300829: Make CtwRunner available as an independent tool#13344caojoshua wants to merge 5 commits intoopenjdk:masterfrom
Conversation
|
👋 Welcome back caojoshua! A progress list of the required criteria for merging this PR into |
|
@caojoshua The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
Webrevs
|
| $(JAR) --create --file=$@ --main-class $(CTW_MAIN_CLASS) -C $(OUTPUT_DIR) . | ||
| @rm -rf $(OUTPUT_DIR) | ||
|
|
||
| $(DST_DIR)/ctwrunner.jar: filelist $(DST_DIR)/wb.jar |
There was a problem hiding this comment.
Theoretically, we can avoid from generating ctwrunner.jar. The classes are the same as 'ctw.jar' and the only different part is the entry point.
to launch CTWRunner, you can do thing like this in ctwruner.sh
echo '$${JAVA_HOME}/bin/java $${JAVA_OPTIONS} -Dtest.jdk=$${JAVA_HOME} -cp ctw.jar $CTWRUNNER_MAIN_CLASS $$@' > $@
it's up to you. if we generate ctwrunner.jar, we will have a "standalone" jar.
There was a problem hiding this comment.
I removed ctwrunner.jar in newest commit.
I also realized I was javac'ing twice. We avoid this entirely by removing the extra jar.
| * Value of {@code -Dsun.hotspot.tools.ctwrunner.ctw_extra_args}. Extra | ||
| * comma-separated arguments to pass to CTW subprocesses. | ||
| */ | ||
| public static final String CTW_EXTRA_ARGS |
There was a problem hiding this comment.
how about you use getProperty("sun.hotspot.tools.ctwrunner.ctw_extra_args", "").
by giving it an empty string as default value, you can take iout if (null != CTW_EXTRA_ARGS) below.
btw, you may also need to update the year in the copyrights header.
There was a problem hiding this comment.
Yup. Made these changes.
There was a problem hiding this comment.
Better to make CTW_EXTRA_ARGS private. If it's needed outside this class, add a public accessor. Don't think it's needed outside though.
There was a problem hiding this comment.
Made it private. Not needed outside.
navyxliu
left a comment
There was a problem hiding this comment.
LGTM. I am not a reviewer. need other reviewers to approve this.
|
@caojoshua 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 34 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. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@navyxliu, @phohensee) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
|
/integrate |
|
@caojoshua |
|
/sponsor |
|
Going to push as commit 314e9b3.
Your commit was automatically rebased without conflicts. |
|
@phohensee @caojoshua Pushed as commit 314e9b3. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Create an independent jar file with CtwRunner as the main class to make it easier to run. Not needed anymore thanks to @navyxliu 's comments. We can use the originalctw.jarbecause it already has ctwrunner class.wb.jar, but the jtreg tests that use CTWRunner has class files outside of a jar.sun.hotspot.tools.ctwrunner.ctw_extra_argsoption to pass extra arguments to CTW. Arguments are comma separated because working with spaces in bash can be kind of awkward, but I'm open to changing this part.Motivation
CTWRunner is a wrapper around CTW that will continue compiling beyond failure. It can be useful for testing compilation with certain flags. For example, one could run
To test compiling the java.base module with
-XX:+StressLCM -XX:+StressGCM. This is advantageous over uses CTW because we can see the full list of crashes for the entire module.Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/13344/head:pull/13344$ git checkout pull/13344Update a local copy of the PR:
$ git checkout pull/13344$ git pull https://git.openjdk.org/jdk.git pull/13344/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 13344View PR using the GUI difftool:
$ git pr show -t 13344Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/13344.diff
Webrev
Link to Webrev Comment