--- old/test/hotspot/jtreg/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOption.java 2018-08-28 08:56:26.978885778 -0700 +++ new/test/hotspot/jtreg/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOption.java 2018-08-28 08:56:26.742876802 -0700 @@ -34,6 +34,7 @@ import jdk.test.lib.process.ProcessTools; import jdk.test.lib.dcmd.CommandExecutor; import jdk.test.lib.dcmd.JMXExecutor; +import jdk.test.lib.Platform; import sun.tools.attach.HotSpotVirtualMachine; import static optionsvalidation.JVMOptionsUtils.failedMessage; @@ -384,6 +385,17 @@ runJava.add(VMType); } + // Run with a small heap to avoid excessive execution time + long max = Runtime.getRuntime().maxMemory() / 1024 / 1024; + if (max > 1024) { + runJava.add("-Xmx1024m"); + } + + if (Platform.isDebugBuild()) { + // Avoid excessive execution time. + runJava.add("-XX:-ZapUnusedHeapArea"); + } + if (GCType != null && !(prepend.contains("-XX:+UseConcMarkSweepGC") || prepend.contains("-XX:+UseSerialGC") ||