--- old/test/hotspot/jtreg/gc/CriticalNativeArgs.java 2018-11-28 19:19:23.592297064 +0100 +++ new/test/hotspot/jtreg/gc/CriticalNativeArgs.java 2018-11-28 19:19:23.442298115 +0100 @@ -23,14 +23,20 @@ /* - * @test CriticalNativeStress + * @test CriticalNativeStressEpsilon * @key gc * @bug 8199868 - * @requires (os.arch =="x86_64" | os.arch == "amd64") & (vm.bits == "64") & vm.gc.Epsilon & !vm.graal.enabled - * @requires (os.arch =="x86_64" | os.arch == "amd64") & (vm.bits == "64") & vm.gc.Shenandoah & !vm.graal.enabled + * @requires (os.arch =="x86_64" | os.arch == "amd64") & vm.gc.Epsilon & !vm.graal.enabled * @summary test argument unpacking nmethod wrapper of critical native method * @run main/othervm/native -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -Xcomp -Xmx256M -XX:+CriticalJNINatives CriticalNativeArgs - * + */ + +/* + * @test CriticalNativeStressShenandoah + * @key gc + * @bug 8199868 + * @requires (os.arch =="x86_64" | os.arch == "amd64") & vm.gc.Shenandoah & !vm.graal.enabled + * @summary test argument unpacking nmethod wrapper of critical native method * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=passive -XX:+ShenandoahDegeneratedGC -Xcomp -Xmx512M -XX:+CriticalJNINatives CriticalNativeArgs * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=passive -XX:-ShenandoahDegeneratedGC -Xcomp -Xmx512M -XX:+CriticalJNINatives CriticalNativeArgs * @@ -58,4 +64,3 @@ } } } - --- old/test/hotspot/jtreg/gc/TestFullGCCount.java 2018-11-28 19:19:24.182292931 +0100 +++ new/test/hotspot/jtreg/gc/TestFullGCCount.java 2018-11-28 19:19:24.030293995 +0100 @@ -26,7 +26,16 @@ * @bug 7072527 * @summary CMS: JMM GC counters overcount in some cases * @requires !(vm.gc.ConcMarkSweep & vm.opt.ExplicitGCInvokesConcurrent == true) - * @requires !(vm.gc == "Shenandoah" & !(vm.opt.ExplicitGCInvokesConcurrent == false)) + * @modules java.management + * @run main/othervm -Xlog:gc TestFullGCCount + */ + +/** + * @test TestFullGCCountShenandoah + * @bug 7072527 + * @summary Shenandoah: JMM GC counters overcount in some cases + * @requires vm.gc.Shenandoah + * @requires vm.opt.ExplicitGCInvokesConcurrent == false * @modules java.management * @run main/othervm -Xlog:gc TestFullGCCount */ --- old/test/hotspot/jtreg/gc/TestHumongousReferenceObject.java 2018-11-28 19:19:24.781288734 +0100 +++ new/test/hotspot/jtreg/gc/TestHumongousReferenceObject.java 2018-11-28 19:19:24.628289806 +0100 @@ -34,6 +34,14 @@ * @run main/othervm -XX:+EnableContended -XX:-RestrictContended -Xmx128m -XX:+UseG1GC -XX:G1HeapRegionSize=2M -XX:ContendedPaddingWidth=8192 TestHumongousReferenceObject * @run main/othervm -XX:+EnableContended -XX:-RestrictContended -Xmx128m -XX:+UseG1GC -XX:G1HeapRegionSize=4M -XX:ContendedPaddingWidth=8192 TestHumongousReferenceObject * @run main/othervm -XX:+EnableContended -XX:-RestrictContended -Xmx128m -XX:+UseG1GC -XX:G1HeapRegionSize=8M -XX:ContendedPaddingWidth=8192 TestHumongousReferenceObject + */ + +/* + * @test TestHumongousReferenceObjectShenandoah + * @summary Test that verifies that iteration over large, plain Java objects, that potentially cross region boundaries, with references in them works. + * @requires vm.gc.Shenandoah + * @bug 8151499 8153734 + * @modules java.base/jdk.internal.vm.annotation * @run main/othervm -XX:+EnableContended -XX:-RestrictContended -Xmx128m -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahHeapRegionSize=8M -XX:ContendedPaddingWidth=8192 TestHumongousReferenceObject * @run main/othervm -XX:+EnableContended -XX:-RestrictContended -Xmx128m -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahHeapRegionSize=8M -XX:ContendedPaddingWidth=8192 -XX:+UnlockDiagnosticVMOptions -XX:+ShenandoahVerify TestHumongousReferenceObject */ --- old/test/hotspot/jtreg/gc/TestSystemGC.java 2018-11-28 19:19:25.400284398 +0100 +++ new/test/hotspot/jtreg/gc/TestSystemGC.java 2018-11-28 19:19:25.244285490 +0100 @@ -34,8 +34,6 @@ * @run main/othervm -XX:+UseG1GC -XX:+ExplicitGCInvokesConcurrent TestSystemGC * @run main/othervm -XX:+UseLargePages TestSystemGC * @run main/othervm -XX:+UseLargePages -XX:+UseLargePagesInMetaspace TestSystemGC - * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC TestSystemGC - * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:+ExplicitGCInvokesConcurrent TestSystemGC */ /* @@ -47,6 +45,14 @@ * @run main/othervm -XX:+UseConcMarkSweepGC -XX:+ExplicitGCInvokesConcurrent TestSystemGC */ +/* + * @test TestSystemGCShenandoah + * @key gc + * @requires vm.gc.Shenandoah & !vm.graal.enabled + * @summary Runs System.gc() with different flags. + * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC TestSystemGC + * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:+ExplicitGCInvokesConcurrent TestSystemGC + */ public class TestSystemGC { public static void main(String args[]) throws Exception { System.gc(); --- old/test/hotspot/jtreg/gc/arguments/TestAlignmentToUseLargePages.java 2018-11-28 19:19:25.992280250 +0100 +++ new/test/hotspot/jtreg/gc/arguments/TestAlignmentToUseLargePages.java 2018-11-28 19:19:25.841281308 +0100 @@ -53,7 +53,7 @@ * @key gc * @bug 8024396 * @comment Graal does not support Shenandoah - * @requires vm.gc=="null" & !vm.graal.enabled + * @requires vm.gc.Shenandoah & !vm.graal.enabled * @run main/othervm -Xms71M -Xmx91M -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:+UseLargePages TestAlignmentToUseLargePages * @run main/othervm -Xms71M -Xmx91M -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:-UseLargePages TestAlignmentToUseLargePages */ --- old/test/hotspot/jtreg/gc/arguments/TestUseCompressedOopsErgo.java 2018-11-28 19:19:26.591276054 +0100 +++ new/test/hotspot/jtreg/gc/arguments/TestUseCompressedOopsErgo.java 2018-11-28 19:19:26.433277161 +0100 @@ -59,7 +59,7 @@ * @key gc * @bug 8010722 * @comment Graal does not support Shenandoah - * @requires vm.gc=="null" & !vm.graal.enabled + * @requires vm.gc.Shenandoah & !vm.graal.enabled * @library /test/lib * @modules java.base/jdk.internal.misc * java.management/sun.management --- old/test/hotspot/jtreg/gc/class_unloading/TestClassUnloadingDisabled.java 2018-11-28 19:19:27.193271836 +0100 +++ new/test/hotspot/jtreg/gc/class_unloading/TestClassUnloadingDisabled.java 2018-11-28 19:19:27.034272950 +0100 @@ -65,11 +65,11 @@ */ /* - * @test + * @test TestClassUnloadingDisabledShenandoah * @key gc * @bug 8114823 * @comment Graal does not support Shenandoah - * @requires vm.gc=="null" & !vm.graal.enabled + * @requires vm.gc.Shenandoah & !vm.graal.enabled * @requires vm.opt.ExplicitGCInvokesConcurrent != true * @requires vm.opt.ClassUnloading != true * @library /test/lib --- old/test/hotspot/jtreg/gc/ergonomics/TestDynamicNumberOfGCThreads.java 2018-11-28 19:19:27.796267612 +0100 +++ new/test/hotspot/jtreg/gc/ergonomics/TestDynamicNumberOfGCThreads.java 2018-11-28 19:19:27.638268719 +0100 @@ -29,10 +29,14 @@ * @key gc * @modules java.base/jdk.internal.misc * @library /test/lib + * @build sun.hotspot.WhiteBox + * @run driver ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission + * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI TestDynamicNumberOfGCThreads */ import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; +import sun.hotspot.gc.GC; public class TestDynamicNumberOfGCThreads { public static void main(String[] args) throws Exception { @@ -43,7 +47,9 @@ testDynamicNumberOfGCThreads("UseParallelGC"); - testDynamicNumberOfGCThreads("UseShenandoahGC"); + if (GC.Shenandoah.isSupported()) { + testDynamicNumberOfGCThreads("UseShenandoahGC"); + } } private static void verifyDynamicNumberOfGCThreads(OutputAnalyzer output) { --- old/test/hotspot/jtreg/gc/ergonomics/TestInitialGCThreadLogging.java 2018-11-28 19:19:28.392263436 +0100 +++ new/test/hotspot/jtreg/gc/ergonomics/TestInitialGCThreadLogging.java 2018-11-28 19:19:28.231264564 +0100 @@ -29,10 +29,14 @@ * @key gc * @modules java.base/jdk.internal.misc * @library /test/lib + * @build sun.hotspot.WhiteBox + * @run driver ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission + * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI TestInitialGCThreadLogging */ import jdk.test.lib.process.ProcessTools; import jdk.test.lib.process.OutputAnalyzer; +import sun.hotspot.gc.GC; public class TestInitialGCThreadLogging { public static void main(String[] args) throws Exception { @@ -43,7 +47,9 @@ testInitialGCThreadLogging("UseParallelGC", "ParGC Thread"); - testInitialGCThreadLogging("UseShenandoahGC", "Shenandoah GC Thread"); + if (GC.Shenandoah.isSupported()) { + testInitialGCThreadLogging("UseShenandoahGC", "Shenandoah GC Thread"); + } } private static void verifyDynamicNumberOfGCThreads(OutputAnalyzer output, String threadName) { --- old/test/hotspot/jtreg/gc/logging/TestGCId.java 2018-11-28 19:19:28.996259205 +0100 +++ new/test/hotspot/jtreg/gc/logging/TestGCId.java 2018-11-28 19:19:28.834260340 +0100 @@ -30,10 +30,14 @@ * @library /test/lib * @modules java.base/jdk.internal.misc * java.management + * @build sun.hotspot.WhiteBox + * @run driver ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission + * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI TestGCId */ import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; +import sun.hotspot.gc.GC; public class TestGCId { public static void main(String[] args) throws Exception { @@ -41,7 +45,9 @@ testGCId("UseG1GC"); testGCId("UseConcMarkSweepGC"); testGCId("UseSerialGC"); - testGCId("UseShenandoahGC"); + if (GC.Shenandoah.isSupported()) { + testGCId("UseShenandoahGC"); + } } private static void verifyContainsGCIDs(OutputAnalyzer output) { --- old/test/hotspot/jtreg/gc/metaspace/TestMetaspacePerfCounters.java 2018-11-28 19:19:29.604254946 +0100 +++ new/test/hotspot/jtreg/gc/metaspace/TestMetaspacePerfCounters.java 2018-11-28 19:19:29.446256052 +0100 @@ -48,11 +48,23 @@ * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:-UseCompressedClassPointers -XX:+UsePerfData -XX:+UseSerialGC TestMetaspacePerfCounters * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:-UseCompressedClassPointers -XX:+UsePerfData -XX:+UseParallelGC -XX:+UseParallelOldGC TestMetaspacePerfCounters * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:-UseCompressedClassPointers -XX:+UsePerfData -XX:+UseG1GC TestMetaspacePerfCounters - * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:-UseCompressedClassPointers -XX:+UsePerfData -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC TestMetaspacePerfCounters * * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UseCompressedClassPointers -XX:+UsePerfData -XX:+UseSerialGC TestMetaspacePerfCounters * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UseCompressedClassPointers -XX:+UsePerfData -XX:+UseParallelGC -XX:+UseParallelOldGC TestMetaspacePerfCounters * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UseCompressedClassPointers -XX:+UsePerfData -XX:+UseG1GC TestMetaspacePerfCounters + */ + +/* @test TestMetaspacePerfCountersShenandoah + * @bug 8014659 + * @requires vm.gc.Shenandoah + * @library /test/lib / + * @summary Tests that performance counters for metaspace and compressed class + * space exists and works. + * @modules java.base/jdk.internal.misc + * java.compiler + * java.management/sun.management + * jdk.internal.jvmstat/sun.jvmstat.monitor + * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:-UseCompressedClassPointers -XX:+UsePerfData -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC TestMetaspacePerfCounters * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UseCompressedClassPointers -XX:+UsePerfData -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC TestMetaspacePerfCounters */ public class TestMetaspacePerfCounters { --- old/test/hotspot/jtreg/gc/startup_warnings/TestShenandoah.java 2018-11-28 19:19:30.211250693 +0100 +++ new/test/hotspot/jtreg/gc/startup_warnings/TestShenandoah.java 2018-11-28 19:19:30.053251800 +0100 @@ -24,6 +24,7 @@ /* * @test TestShenandoah * @key gc +* @requires vm.gc.Shenandoah * @bug 8006398 * @summary Test that the Shenandoah collector does not print a warning message * @library /test/lib --- old/test/hotspot/jtreg/gc/stress/CriticalNativeStress.java 2018-11-28 19:19:30.815246462 +0100 +++ new/test/hotspot/jtreg/gc/stress/CriticalNativeStress.java 2018-11-28 19:19:30.656247576 +0100 @@ -24,19 +24,24 @@ import java.util.Random; /* - * @test CriticalNativeStress + * @test CriticalNativeStressEpsilon * @key gc * @bug 8199868 - * @requires (os.arch =="x86_64" | os.arch == "amd64") & (vm.bits == "64") & vm.gc.Epsilon & !vm.graal.enabled - * @requires (os.arch =="x86_64" | os.arch == "amd64") & (vm.bits == "64") & vm.gc.Shenandoah & !vm.graal.enabled + * @requires (os.arch =="x86_64" | os.arch == "amd64") & vm.gc.Epsilon & !vm.graal.enabled * @summary test argument pinning by nmethod wrapper of critical native method * @run main/othervm/native -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -Xcomp -Xmx1G -XX:+CriticalJNINatives CriticalNativeStress - * - * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=passive -XX:+ShenandoahDegeneratedGC -Xcomp -Xmx512M -XX:+CriticalJNINatives CriticalNativeStress + */ + +/* + * @test CriticalNativeStressShenandoah + * @key gc + * @bug 8199868 + * @requires (os.arch =="x86_64" | os.arch == "amd64") & vm.gc.Shenandoah & !vm.graal.enabled + * @summary test argument pinning by nmethod wrapper of critical native method * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=passive -XX:-ShenandoahDegeneratedGC -Xcomp -Xmx512M -XX:+CriticalJNINatives CriticalNativeStress + * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=passive -XX:+ShenandoahDegeneratedGC -Xcomp -Xmx512M -XX:+CriticalJNINatives CriticalNativeStress * * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive -Xcomp -Xmx512M -XX:+CriticalJNINatives CriticalNativeStress - * * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -Xcomp -Xmx256M -XX:+CriticalJNINatives CriticalNativeStress * @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=traversal -Xcomp -Xmx512M -XX:+CriticalJNINatives CriticalNativeStress */ --- old/test/hotspot/jtreg/runtime/CompressedOops/UseCompressedOops.java 2018-11-28 19:19:31.427242174 +0100 +++ new/test/hotspot/jtreg/runtime/CompressedOops/UseCompressedOops.java 2018-11-28 19:19:31.263243323 +0100 @@ -37,6 +37,7 @@ import jdk.test.lib.Platform; import jdk.test.lib.process.ProcessTools; import jdk.test.lib.process.OutputAnalyzer; +import sun.hotspot.gc.GC; import sun.hotspot.code.Compiler; @@ -61,7 +62,9 @@ testCompressedOopsModes(args, "-XX:+UseSerialGC"); testCompressedOopsModes(args, "-XX:+UseParallelGC"); testCompressedOopsModes(args, "-XX:+UseParallelOldGC"); - testCompressedOopsModes(args, "-XX:+UseShenandoahGC"); + if (GC.Shenandoah.isSupported()) { + testCompressedOopsModes(args, "-XX:+UseShenandoahGC"); + } } public static void testCompressedOopsModes(ArrayList flags1, String... flags2) throws Exception { --- old/test/hotspot/jtreg/runtime/MemberName/MemberNameLeak.java 2018-11-28 19:19:32.028237964 +0100 +++ new/test/hotspot/jtreg/runtime/MemberName/MemberNameLeak.java 2018-11-28 19:19:31.872239057 +0100 @@ -37,6 +37,7 @@ import jdk.test.lib.process.ProcessTools; import sun.hotspot.WhiteBox; import sun.hotspot.code.Compiler; +import sun.hotspot.gc.GC; public class MemberNameLeak { static class Leak { @@ -100,8 +101,10 @@ if (!Compiler.isGraalEnabled()) { // Graal does not support CMS test("-XX:+UseConcMarkSweepGC", false); test("-XX:+UseConcMarkSweepGC", true); - test("-XX:+UseShenandoahGC", true); - test("-XX:+UseShenandoahGC", false); + if (GC.Shenandoah.isSupported()) { + test("-XX:+UseShenandoahGC", true); + test("-XX:+UseShenandoahGC", false); + } } } }