test/jdk/java/lang/management/MemoryMXBean/ResetPeakMemoryUsage.java
changeset 59053 ba6c248cae19
parent 52731 157c1130b46e
equal deleted inserted replaced
59051:f0312c7d5b37 59053:ba6c248cae19
     1 /*
     1 /*
     2  * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    61      */
    61      */
    62     public static void main(String a[]) throws Throwable {
    62     public static void main(String a[]) throws Throwable {
    63         final String main = "ResetPeakMemoryUsage$TestMain";
    63         final String main = "ResetPeakMemoryUsage$TestMain";
    64         final String ms = "-Xms256m";
    64         final String ms = "-Xms256m";
    65         final String mn = "-Xmn8m";
    65         final String mn = "-Xmn8m";
    66         if (!Compiler.isGraalEnabled()) { // Graal does not support CMS
    66 
    67             RunUtil.runTestClearGcOpts(main, ms, mn, "-XX:+UseConcMarkSweepGC");
       
    68         }
       
    69         RunUtil.runTestClearGcOpts(main, ms, mn, "-XX:+UseParallelGC");
    67         RunUtil.runTestClearGcOpts(main, ms, mn, "-XX:+UseParallelGC");
    70         RunUtil.runTestClearGcOpts(main, ms, mn, "-XX:+UseG1GC", "-XX:G1HeapRegionSize=1m");
    68         RunUtil.runTestClearGcOpts(main, ms, mn, "-XX:+UseG1GC", "-XX:G1HeapRegionSize=1m");
    71         RunUtil.runTestClearGcOpts(main, ms, mn, "-XX:+UseSerialGC",
    69         RunUtil.runTestClearGcOpts(main, ms, mn, "-XX:+UseSerialGC",
    72                 "-XX:MarkSweepAlwaysCompactCount=1");
    70                 "-XX:MarkSweepAlwaysCompactCount=1");
    73     }
    71     }