< prev index next >

test/hotspot/jtreg/runtime/MemberName/MemberNameLeak.java

Print this page

        

@@ -35,10 +35,11 @@
 import java.lang.invoke.*;
 import jdk.test.lib.process.OutputAnalyzer;
 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 {
       public void callMe() {
       }

@@ -74,10 +75,11 @@
 
     public static void test(String gc, boolean doConcurrent) throws Throwable {
         // Run this Leak class with logging
         ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
                                       "-Xlog:membername+table=trace",
+                                      "-XX:+UnlockExperimentalVMOptions",
                                       "-XX:+UnlockDiagnosticVMOptions",
                                       "-XX:+WhiteBoxAPI",
                                       "-Xbootclasspath/a:.",
                                       doConcurrent ? "-XX:+ExplicitGCInvokesConcurrent" : "-XX:-ExplicitGCInvokesConcurrent",
                                       "-XX:+ClassUnloading",

@@ -97,8 +99,12 @@
         test("-XX:+UseParallelGC", false);
         test("-XX:+UseSerialGC", false);
         if (!Compiler.isGraalEnabled()) { // Graal does not support CMS
             test("-XX:+UseConcMarkSweepGC", false);
             test("-XX:+UseConcMarkSweepGC", true);
+            if (GC.Shenandoah.isSupported()) {
+                test("-XX:+UseShenandoahGC", true);
+                test("-XX:+UseShenandoahGC", false);
+            }
         }
     }
 }
< prev index next >