test/hotspot/jtreg/gc/TestSystemGC.java
author lkorinth
Wed, 13 Nov 2019 11:37:29 +0100
changeset 59053 ba6c248cae19
parent 54638 9b8926bf85c1
permissions -rw-r--r--
8232365: Implementation for JEP 363: Remove the Concurrent Mark Sweep (CMS) Garbage Collector Reviewed-by: kbarrett, tschatzl, erikj, coleenp, dholmes
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
21114
624bcbea49bb 8026781: Add missing test to exercise -XX:+UseLargePagesInMetaspace
stefank
parents:
diff changeset
     1
/*
53523
4c5184c56dc2 8214799: Add package declaration to each JTREG test case in the gc folder
lkorinth
parents: 52925
diff changeset
     2
 * Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
41705
332239c052cc 8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents: 27898
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
332239c052cc 8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents: 27898
diff changeset
     4
 *
332239c052cc 8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents: 27898
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
332239c052cc 8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents: 27898
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
332239c052cc 8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents: 27898
diff changeset
     7
 * published by the Free Software Foundation.
332239c052cc 8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents: 27898
diff changeset
     8
 *
332239c052cc 8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents: 27898
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
332239c052cc 8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents: 27898
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
332239c052cc 8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents: 27898
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
332239c052cc 8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents: 27898
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
332239c052cc 8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents: 27898
diff changeset
    13
 * accompanied this code).
332239c052cc 8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents: 27898
diff changeset
    14
 *
332239c052cc 8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents: 27898
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
332239c052cc 8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents: 27898
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
332239c052cc 8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents: 27898
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
332239c052cc 8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents: 27898
diff changeset
    18
 *
332239c052cc 8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents: 27898
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
332239c052cc 8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents: 27898
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
332239c052cc 8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents: 27898
diff changeset
    21
 * questions.
332239c052cc 8165687: Fix license and copyright headers in jd9 under hotspot/test
stsmirno
parents: 27898
diff changeset
    22
 */
21114
624bcbea49bb 8026781: Add missing test to exercise -XX:+UseLargePagesInMetaspace
stefank
parents:
diff changeset
    23
53523
4c5184c56dc2 8214799: Add package declaration to each JTREG test case in the gc folder
lkorinth
parents: 52925
diff changeset
    24
package gc;
4c5184c56dc2 8214799: Add package declaration to each JTREG test case in the gc folder
lkorinth
parents: 52925
diff changeset
    25
21114
624bcbea49bb 8026781: Add missing test to exercise -XX:+UseLargePagesInMetaspace
stefank
parents:
diff changeset
    26
/*
54638
9b8926bf85c1 8220813: update hotspot tier1_gc tests depending on GC to use @requires vm.gc.X
lmesnik
parents: 53523
diff changeset
    27
 * @test TestSystemGCSerial
21114
624bcbea49bb 8026781: Add missing test to exercise -XX:+UseLargePagesInMetaspace
stefank
parents:
diff changeset
    28
 * @key gc
54638
9b8926bf85c1 8220813: update hotspot tier1_gc tests depending on GC to use @requires vm.gc.X
lmesnik
parents: 53523
diff changeset
    29
 * @requires vm.gc.Serial
21114
624bcbea49bb 8026781: Add missing test to exercise -XX:+UseLargePagesInMetaspace
stefank
parents:
diff changeset
    30
 * @summary Runs System.gc() with different flags.
53523
4c5184c56dc2 8214799: Add package declaration to each JTREG test case in the gc folder
lkorinth
parents: 52925
diff changeset
    31
 * @run main/othervm -XX:+UseSerialGC gc.TestSystemGC
54638
9b8926bf85c1 8220813: update hotspot tier1_gc tests depending on GC to use @requires vm.gc.X
lmesnik
parents: 53523
diff changeset
    32
 */
9b8926bf85c1 8220813: update hotspot tier1_gc tests depending on GC to use @requires vm.gc.X
lmesnik
parents: 53523
diff changeset
    33
9b8926bf85c1 8220813: update hotspot tier1_gc tests depending on GC to use @requires vm.gc.X
lmesnik
parents: 53523
diff changeset
    34
/*
9b8926bf85c1 8220813: update hotspot tier1_gc tests depending on GC to use @requires vm.gc.X
lmesnik
parents: 53523
diff changeset
    35
 * @test TestSystemGCParallel
9b8926bf85c1 8220813: update hotspot tier1_gc tests depending on GC to use @requires vm.gc.X
lmesnik
parents: 53523
diff changeset
    36
 * @key gc
9b8926bf85c1 8220813: update hotspot tier1_gc tests depending on GC to use @requires vm.gc.X
lmesnik
parents: 53523
diff changeset
    37
 * @requires vm.gc.Parallel
9b8926bf85c1 8220813: update hotspot tier1_gc tests depending on GC to use @requires vm.gc.X
lmesnik
parents: 53523
diff changeset
    38
 * @summary Runs System.gc() with different flags.
53523
4c5184c56dc2 8214799: Add package declaration to each JTREG test case in the gc folder
lkorinth
parents: 52925
diff changeset
    39
 * @run main/othervm -XX:+UseParallelGC gc.TestSystemGC
4c5184c56dc2 8214799: Add package declaration to each JTREG test case in the gc folder
lkorinth
parents: 52925
diff changeset
    40
 * @run main/othervm -XX:+UseParallelGC -XX:-UseParallelOldGC gc.TestSystemGC
54638
9b8926bf85c1 8220813: update hotspot tier1_gc tests depending on GC to use @requires vm.gc.X
lmesnik
parents: 53523
diff changeset
    41
 */
9b8926bf85c1 8220813: update hotspot tier1_gc tests depending on GC to use @requires vm.gc.X
lmesnik
parents: 53523
diff changeset
    42
9b8926bf85c1 8220813: update hotspot tier1_gc tests depending on GC to use @requires vm.gc.X
lmesnik
parents: 53523
diff changeset
    43
/*
9b8926bf85c1 8220813: update hotspot tier1_gc tests depending on GC to use @requires vm.gc.X
lmesnik
parents: 53523
diff changeset
    44
 * @test TestSystemGCG1
9b8926bf85c1 8220813: update hotspot tier1_gc tests depending on GC to use @requires vm.gc.X
lmesnik
parents: 53523
diff changeset
    45
 * @key gc
9b8926bf85c1 8220813: update hotspot tier1_gc tests depending on GC to use @requires vm.gc.X
lmesnik
parents: 53523
diff changeset
    46
 * @requires vm.gc.G1
9b8926bf85c1 8220813: update hotspot tier1_gc tests depending on GC to use @requires vm.gc.X
lmesnik
parents: 53523
diff changeset
    47
 * @summary Runs System.gc() with different flags.
53523
4c5184c56dc2 8214799: Add package declaration to each JTREG test case in the gc folder
lkorinth
parents: 52925
diff changeset
    48
 * @run main/othervm -XX:+UseG1GC gc.TestSystemGC
4c5184c56dc2 8214799: Add package declaration to each JTREG test case in the gc folder
lkorinth
parents: 52925
diff changeset
    49
 * @run main/othervm -XX:+UseG1GC -XX:+ExplicitGCInvokesConcurrent gc.TestSystemGC
4c5184c56dc2 8214799: Add package declaration to each JTREG test case in the gc folder
lkorinth
parents: 52925
diff changeset
    50
 * @run main/othervm -XX:+UseLargePages gc.TestSystemGC
4c5184c56dc2 8214799: Add package declaration to each JTREG test case in the gc folder
lkorinth
parents: 52925
diff changeset
    51
 * @run main/othervm -XX:+UseLargePages -XX:+UseLargePagesInMetaspace gc.TestSystemGC
21114
624bcbea49bb 8026781: Add missing test to exercise -XX:+UseLargePagesInMetaspace
stefank
parents:
diff changeset
    52
 */
624bcbea49bb 8026781: Add missing test to exercise -XX:+UseLargePagesInMetaspace
stefank
parents:
diff changeset
    53
50455
2b73cce96dce 8202611: [GRAAL] Exclude CMS GC testing from runs with Graal
kvn
parents: 47216
diff changeset
    54
/*
52925
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents: 50455
diff changeset
    55
 * @test TestSystemGCShenandoah
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents: 50455
diff changeset
    56
 * @key gc
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents: 50455
diff changeset
    57
 * @requires vm.gc.Shenandoah & !vm.graal.enabled
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents: 50455
diff changeset
    58
 * @summary Runs System.gc() with different flags.
53523
4c5184c56dc2 8214799: Add package declaration to each JTREG test case in the gc folder
lkorinth
parents: 52925
diff changeset
    59
 * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC gc.TestSystemGC
4c5184c56dc2 8214799: Add package declaration to each JTREG test case in the gc folder
lkorinth
parents: 52925
diff changeset
    60
 * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:+ExplicitGCInvokesConcurrent gc.TestSystemGC
52925
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents: 50455
diff changeset
    61
 */
21114
624bcbea49bb 8026781: Add missing test to exercise -XX:+UseLargePagesInMetaspace
stefank
parents:
diff changeset
    62
public class TestSystemGC {
624bcbea49bb 8026781: Add missing test to exercise -XX:+UseLargePagesInMetaspace
stefank
parents:
diff changeset
    63
  public static void main(String args[]) throws Exception {
624bcbea49bb 8026781: Add missing test to exercise -XX:+UseLargePagesInMetaspace
stefank
parents:
diff changeset
    64
    System.gc();
624bcbea49bb 8026781: Add missing test to exercise -XX:+UseLargePagesInMetaspace
stefank
parents:
diff changeset
    65
  }
624bcbea49bb 8026781: Add missing test to exercise -XX:+UseLargePagesInMetaspace
stefank
parents:
diff changeset
    66
}