RFR: 8300829: Make CtwRunner available as an independent tool [v2]

Joshua Cao duke at openjdk.org
Wed Apr 5 17:01:14 UTC 2023


On Wed, 5 Apr 2023 05:05:33 GMT, Xin Liu <xliu at openjdk.org> wrote:

>> Joshua Cao has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - Upgrade CTWRunner.java copyright header
>>  - Remove ctwrunner.jar and default value for CTW extra args
>
> test/hotspot/jtreg/testlibrary/ctw/Makefile line 94:
> 
>> 92: 	@rm -rf $(OUTPUT_DIR)
>> 93: 
>> 94: $(DST_DIR)/ctwrunner.jar: filelist $(DST_DIR)/wb.jar
> 
> 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.

I removed ctwrunner.jar in newest commit.

I also realized I was javac'ing twice. We avoid this entirely by removing the extra jar.

> test/hotspot/jtreg/testlibrary/ctw/src/sun/hotspot/tools/ctw/CtwRunner.java line 60:
> 
>> 58:      * comma-separated arguments to pass to CTW subprocesses.
>> 59:      */
>> 60:     public static final String CTW_EXTRA_ARGS
> 
> 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.

Yup. Made these changes.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/13344#discussion_r1158781138
PR Review Comment: https://git.openjdk.org/jdk/pull/13344#discussion_r1158782366


More information about the hotspot-compiler-dev mailing list