--- a/hotspot/test/gc/metaspace/TestMetaspacePerfCounters.java Mon Apr 04 11:32:04 2016 +0200
+++ b/hotspot/test/gc/metaspace/TestMetaspacePerfCounters.java Thu Mar 24 10:49:08 2016 +0100
@@ -84,6 +84,9 @@
}
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();