hotspot/test/gc/metaspace/TestMetaspacePerfCounters.java
changeset 37267 ad8c0e8de29f
parent 36847 3b6a93156b10
parent 37244 9b8f2dc281ad
child 37297 d65d53a0ecc7
equal deleted inserted replaced
36848:33688f44fb2a 37267:ad8c0e8de29f
    35  *          space exists and works.
    35  *          space exists and works.
    36  * @modules java.base/sun.misc
    36  * @modules java.base/sun.misc
    37  *          java.compiler
    37  *          java.compiler
    38  *          java.management
    38  *          java.management
    39  *          jdk.jvmstat/sun.jvmstat.monitor
    39  *          jdk.jvmstat/sun.jvmstat.monitor
    40  * @ignore 8151460
       
    41  * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:-UseCompressedClassPointers -XX:+UsePerfData -XX:+UseSerialGC TestMetaspacePerfCounters
    40  * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:-UseCompressedClassPointers -XX:+UsePerfData -XX:+UseSerialGC TestMetaspacePerfCounters
    42  * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:-UseCompressedClassPointers -XX:+UsePerfData -XX:+UseParallelGC -XX:+UseParallelOldGC TestMetaspacePerfCounters
    41  * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:-UseCompressedClassPointers -XX:+UsePerfData -XX:+UseParallelGC -XX:+UseParallelOldGC TestMetaspacePerfCounters
    43  * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:-UseCompressedClassPointers -XX:+UsePerfData -XX:+UseG1GC TestMetaspacePerfCounters
    42  * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:-UseCompressedClassPointers -XX:+UsePerfData -XX:+UseG1GC TestMetaspacePerfCounters
    44  *
    43  *
    45  * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UseCompressedClassPointers -XX:+UsePerfData -XX:+UseSerialGC TestMetaspacePerfCounters
    44  * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -XX:+UseCompressedClassPointers -XX:+UsePerfData -XX:+UseSerialGC TestMetaspacePerfCounters
    83             assertEQ(counter.longValue(), 0L, msg);
    82             assertEQ(counter.longValue(), 0L, msg);
    84         }
    83         }
    85     }
    84     }
    86 
    85 
    87     private static void checkUsedIncreasesWhenLoadingClass(String ns) throws Exception {
    86     private static void checkUsedIncreasesWhenLoadingClass(String ns) throws Exception {
       
    87         // Need to ensure that used is up to date and that all unreachable
       
    88         // classes are unloaded before doing this check.
       
    89         System.gc();
    88         long before = getUsed(ns);
    90         long before = getUsed(ns);
    89         fooClass = compileAndLoad("Foo", "public class Foo { }");
    91         fooClass = compileAndLoad("Foo", "public class Foo { }");
    90         System.gc();
    92         System.gc();
    91         long after = getUsed(ns);
    93         long after = getUsed(ns);
    92 
    94