< prev index next >
test/hotspot/jtreg/runtime/MemberName/MemberNameLeak.java
Print this page
rev 52801 : Upstream/backport Shenandoah to JDK11u
* * *
[backport] 8237570: Shenandoah: cleanup uses of allocation/free threshold in static heuristics
Reviewed-by: rkennke
@@ -34,10 +34,11 @@
import java.lang.invoke.*;
import jdk.test.lib.process.OutputAnalyzer;
import jdk.test.lib.process.ProcessTools;
import sun.hotspot.code.Compiler;
+import sun.hotspot.gc.GC;
public class MemberNameLeak {
static class Leak {
public void callMe() {
}
@@ -59,10 +60,11 @@
public static void test(String gc) throws Throwable {
// 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");
output.shouldContain("ResolvedMethod entry found for MemberNameLeak$Leak.callMe()V");
output.shouldContain("ResolvedMethod entry removed");
@@ -71,10 +73,13 @@
public static void main(java.lang.String[] unused) throws Throwable {
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");
+ }
}
}
}
< prev index next >