1 /*
   2  * Copyright (c) 2016, 2018, Red Hat, Inc. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 package gc.stress.gcbasher;
  26 
  27 import java.io.IOException;
  28 
  29 /*
  30  * @test TestGCBasherWithShenandoah
  31  * @key gc
  32  * @key stress
  33  * @library /
  34  * @requires vm.gc.Shenandoah & !vm.graal.enabled
  35  * @requires vm.flavor == "server" & !vm.emulatedClient & !vm.graal.enabled
  36  * @summary Stress the Shenandoah GC by trying to make old objects more likely to be garbage than young objects.
  37  *
  38  * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
  39  *      -XX:+UseShenandoahGC -XX:ShenandoahGCMode=passive
  40  *      -XX:+ShenandoahVerify -XX:+ShenandoahDegeneratedGC
  41  *      gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
  42  *
  43  * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
  44  *      -XX:+UseShenandoahGC -XX:ShenandoahGCMode=passive
  45  *      -XX:+ShenandoahVerify -XX:-ShenandoahDegeneratedGC
  46  *      gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
  47  */
  48 
  49 /*
  50  * @test TestGCBasherWithShenandoah
  51  * @key gc
  52  * @key stress
  53  * @library /
  54  * @requires vm.gc.Shenandoah & !vm.graal.enabled
  55  * @requires vm.flavor == "server" & !vm.emulatedClient & !vm.graal.enabled
  56  * @summary Stress the Shenandoah GC by trying to make old objects more likely to be garbage than young objects.
  57  *
  58  * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
  59  *      -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive
  60  *      -XX:+ShenandoahOOMDuringEvacALot
  61  *      gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
  62  *
  63  * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
  64  *      -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive
  65  *      -XX:+ShenandoahAllocFailureALot
  66  *      gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
  67  *
  68  * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
  69  *      -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive
  70  *      gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
  71  */
  72 
  73 /*
  74  * @test TestGCBasherWithShenandoah
  75  * @key gc
  76  * @key stress
  77  * @library /
  78  * @requires vm.gc.Shenandoah & !vm.graal.enabled
  79  * @requires vm.flavor == "server" & !vm.emulatedClient & !vm.graal.enabled
  80  * @summary Stress the Shenandoah GC by trying to make old objects more likely to be garbage than young objects.
  81  *
  82  * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
  83  *      -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive
  84  *      -XX:+ShenandoahVerify
  85  *      gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
  86  *
  87  * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
  88  *      -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive
  89  *      gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
  90  *
  91  * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
  92  *      -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=compact
  93  *      gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
  94  */
  95 
  96 /*
  97  * @test TestGCBasherWithShenandoah
  98  * @key gc
  99  * @key stress
 100  * @library /
 101  * @requires vm.gc.Shenandoah & !vm.graal.enabled
 102  * @requires vm.flavor == "server" & !vm.emulatedClient & !vm.graal.enabled
 103  * @summary Stress the Shenandoah GC by trying to make old objects more likely to be garbage than young objects.
 104  *
 105  * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
 106  *      -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
 107  *      -XX:+ShenandoahOOMDuringEvacALot
 108  *      gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
 109  *
 110  * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
 111  *      -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
 112  *      -XX:+ShenandoahAllocFailureALot
 113  *      gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
 114  *
 115  * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
 116  *      -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
 117  *      gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
 118  */
 119 
 120 /*
 121  * @test TestGCBasherWithShenandoah
 122  * @key gc
 123  * @key stress
 124  * @library /
 125  * @requires vm.gc.Shenandoah & !vm.graal.enabled
 126  * @requires vm.flavor == "server" & !vm.emulatedClient & !vm.graal.enabled
 127  * @summary Stress the Shenandoah GC by trying to make old objects more likely to be garbage than young objects.
 128  *
 129  * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
 130  *      -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
 131  *      -XX:+ShenandoahVerify
 132  *      gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
 133  *
 134  * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
 135  *      -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
 136  *      gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
 137  */
 138 public class TestGCBasherWithShenandoah {
 139     public static void main(String[] args) throws IOException {
 140         TestGCBasher.main(args);
 141     }
 142 }