-
Enhancement
-
Resolution: Fixed
-
P3
-
None
-
b14
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8322076 | 11.0.23 | Amos SHI | P3 | Resolved | Fixed | b01 |
JDK-8314627 | 11.0.22-oracle | Kavya K S | P3 | Resolved | Fixed | b01 |
JDK-8315205 | 8u401 | Kavya K S | P3 | Resolved | Fixed | b01 |
Most CDS tests are currently using "@run main" to run the main class. However, the main class is usually just a "script" that prepares JAR files and launches child JVM processes that do the real testing (create or use CDS archives). Usually, the main class itself is not the subject of the test.
According to http://openjdk.java.net/jtreg/faq.html
jtreg provides a variant of @run main that can be useful in such situations: @run driver. This is the same as @run main with the exception that any VM options specified on the command line will not be used when running the specified class.
Many of the higher mach5 tiers use "-Xcomp", which cause significant slow down. If we run the main class with "@run driver" instead, we can reduce test execution time.
For example, with the following patch
diff -r 9734424da1cd test/hotspot/jtreg/runtime/appcds/customLoader/HelloCustom.java
--- a/test/hotspot/jtreg/runtime/appcds/customLoader/HelloCustom.java Thu Aug 23 21:16:45 2018 -0700
+++ b/test/hotspot/jtreg/runtime/appcds/customLoader/HelloCustom.java Fri Aug 24 08:39:20 2018 -0700
@@ -35,7 +35,7 @@
* @run driver ClassFileInstaller -jar hello.jar Hello
* @run driver ClassFileInstaller -jar hello_custom.jar CustomLoadee
* @run driver ClassFileInstaller -jar WhiteBox.jar sun.hotspot.WhiteBox
- * @run main HelloCustom
+ * @run driver HelloCustom
*/
The execution time is reduced from 30s to 17s when -Xcomp is specified.
According to http://openjdk.java.net/jtreg/faq.html
jtreg provides a variant of @run main that can be useful in such situations: @run driver. This is the same as @run main with the exception that any VM options specified on the command line will not be used when running the specified class.
Many of the higher mach5 tiers use "-Xcomp", which cause significant slow down. If we run the main class with "@run driver" instead, we can reduce test execution time.
For example, with the following patch
diff -r 9734424da1cd test/hotspot/jtreg/runtime/appcds/customLoader/HelloCustom.java
--- a/test/hotspot/jtreg/runtime/appcds/customLoader/HelloCustom.java Thu Aug 23 21:16:45 2018 -0700
+++ b/test/hotspot/jtreg/runtime/appcds/customLoader/HelloCustom.java Fri Aug 24 08:39:20 2018 -0700
@@ -35,7 +35,7 @@
* @run driver ClassFileInstaller -jar hello.jar Hello
* @run driver ClassFileInstaller -jar hello_custom.jar CustomLoadee
* @run driver ClassFileInstaller -jar WhiteBox.jar sun.hotspot.WhiteBox
- * @run main HelloCustom
+ * @run driver HelloCustom
*/
The execution time is reduced from 30s to 17s when -Xcomp is specified.
- backported by
-
JDK-8314627 [TESTBUG] CDS tests should use "@run driver"
-
- Resolved
-
-
JDK-8315205 [TESTBUG] CDS tests should use "@run driver"
-
- Resolved
-
-
JDK-8322076 [TESTBUG] CDS tests should use "@run driver"
-
- Resolved
-