--- old/test/hotspot/jtreg/runtime/MemberName/MemberNameLeak.java 2020-02-06 19:18:53.070545981 +0100 +++ new/test/hotspot/jtreg/runtime/MemberName/MemberNameLeak.java 2020-02-06 19:18:52.902545996 +0100 @@ -36,6 +36,7 @@ import jdk.test.lib.process.ProcessTools; import sun.hotspot.code.Compiler; +import sun.hotspot.gc.GC; public class MemberNameLeak { static class Leak { @@ -61,6 +62,7 @@ // Run this Leak class with logging ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( "-Xlog:membername+table=trace", + "-XX:+UnlockExperimentalVMOptions", gc, Leak.class.getName()); OutputAnalyzer output = new OutputAnalyzer(pb.start()); output.shouldContain("ResolvedMethod entry added for MemberNameLeak$Leak.callMe()V"); @@ -73,8 +75,11 @@ test("-XX:+UseG1GC"); test("-XX:+UseParallelGC"); test("-XX:+UseSerialGC"); - if (!Compiler.isGraalEnabled()) { // Graal does not support CMS + if (!Compiler.isGraalEnabled()) { // Graal does not support CMS and Shenandoah test("-XX:+UseConcMarkSweepGC"); + if (GC.Shenandoah.isSupported()) { + test("-XX:+UseShenandoahGC"); + } } } }