< prev index next >
test/gc/metaspace/TestMetaspacePerfCounters.java
Print this page
rev 10588 : 8151460: Metaspace counters can have inconsistent values
Reviewed-by:
rev 10589 : [mq]: meta-rev
*** 82,91 ****
--- 82,94 ----
assertEQ(counter.longValue(), 0L, msg);
}
}
private static void checkUsedIncreasesWhenLoadingClass(String ns) throws Exception {
+ // Need to ensure that used is up to date and that all unreachable
+ // classes are unloaded before doing this check.
+ System.gc();
long before = getUsed(ns);
fooClass = compileAndLoad("Foo", "public class Foo { }");
System.gc();
long after = getUsed(ns);
< prev index next >