1 /*
  2 * Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
  3 * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
  4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  5 *
  6 * This code is free software; you can redistribute it and/or modify it
  7 * under the terms of the GNU General Public License version 2 only, as
  8 * published by the Free Software Foundation.
  9 *
 10 * This code is distributed in the hope that it will be useful, but WITHOUT
 11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 12 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 13 * version 2 for more details (a copy is included in the LICENSE file that
 14 * accompanied this code).
 15 *
 16 * You should have received a copy of the GNU General Public License version
 17 * 2 along with this work; if not, write to the Free Software Foundation,
 18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 19 *
 20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 21 * or visit www.oracle.com if you need additional information or have any
 22 * questions.
 23 */
 24 
 25 package gc.stress.gcold;
 26 
 27 /*
 28  * @test id=passive
 29  * @key stress randomness
 30  * @library / /test/lib
 31  * @requires vm.gc.Shenandoah
 32  * @summary Stress the GC by trying to make old objects more likely to be garbage than young objects.
 33  *
 34  * @run main/othervm/timeout=600 -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
 35  *      -XX:+UseShenandoahGC -XX:ShenandoahGCMode=passive
 36  *      -XX:+ShenandoahDegeneratedGC -XX:+ShenandoahVerify
 37  *      gc.stress.gcold.TestGCOld 50 1 20 10 10000
 38  *
 39  * @run main/othervm/timeout=600 -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
 40  *      -XX:+UseShenandoahGC -XX:ShenandoahGCMode=passive
 41  *      -XX:-ShenandoahDegeneratedGC -XX:+ShenandoahVerify
 42  *      gc.stress.gcold.TestGCOld 50 1 20 10 10000
 43  *
 44  * @run main/othervm/timeout=600 -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
 45  *      -XX:+UseShenandoahGC -XX:ShenandoahGCMode=passive
 46  *      -XX:+ShenandoahDegeneratedGC
 47  *      gc.stress.gcold.TestGCOld 50 1 20 10 10000
 48  *
 49  * @run main/othervm/timeout=600 -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
 50  *      -XX:+UseShenandoahGC -XX:ShenandoahGCMode=passive
 51  *      -XX:-ShenandoahDegeneratedGC
 52  *      gc.stress.gcold.TestGCOld 50 1 20 10 10000
 53  */
 54 
 55 /*
 56  * @test id=aggressive
 57  * @key stress randomness
 58  * @library / /test/lib
 59  * @requires vm.gc.Shenandoah
 60  * @summary Stress the GC by trying to make old objects more likely to be garbage than young objects.
 61  *
 62  * @run main/othervm -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
 63  *      -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive
 64  *      -XX:+ShenandoahOOMDuringEvacALot
 65  *      gc.stress.gcold.TestGCOld 50 1 20 10 10000
 66  *
 67  * @run main/othervm -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
 68  *      -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive
 69  *      -XX:+ShenandoahAllocFailureALot
 70  *      gc.stress.gcold.TestGCOld 50 1 20 10 10000
 71  *
 72  * @run main/othervm -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
 73  *      -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive
 74  *      gc.stress.gcold.TestGCOld 50 1 20 10 10000
 75  */
 76 
 77 /*
 78  * @test id=adaptive
 79  * @key stress randomness
 80  * @library / /test/lib
 81  * @requires vm.gc.Shenandoah
 82  * @summary Stress the GC by trying to make old objects more likely to be garbage than young objects.
 83  *
 84  * @run main/othervm/timeout=600 -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
 85  *      -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive
 86  *      -XX:+ShenandoahVerify
 87  *      gc.stress.gcold.TestGCOld 50 1 20 10 10000
 88  *
 89  * @run main/othervm -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
 90  *      -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive
 91  *      gc.stress.gcold.TestGCOld 50 1 20 10 10000
 92  */
 93 
 94 /*
 95  * @test id=compact
 96  * @key stress randomness
 97  * @library / /test/lib
 98  * @requires vm.gc.Shenandoah
 99  * @summary Stress the GC by trying to make old objects more likely to be garbage than young objects.
100  *
101  * @run main/othervm -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
102  *      -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=compact
103  *      gc.stress.gcold.TestGCOld 50 1 20 10 10000
104  */
105 
106 /*
107  * @test id=generational
108  * @key stress randomness
109  * @library / /test/lib
110  * @requires vm.gc.Shenandoah
111  * @summary Stress the GC by trying to make old objects more likely to be garbage than young objects.
112  *
113  * @run main/othervm/timeout=600 -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
114  *      -XX:+UseShenandoahGC -XX:ShenandoahGCMode=generational
115  *      -XX:+ShenandoahVerify
116  *      gc.stress.gcold.TestGCOld 50 1 20 10 10000
117  *
118  * @run main/othervm -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
119  *      -XX:+UseShenandoahGC -XX:ShenandoahGCMode=generational
120  *      gc.stress.gcold.TestGCOld 50 1 20 10 10000
121  */
122 public class TestGCOldWithShenandoah {
123 
124     public static void main(String[] args) {
125         TestGCOld.main(args);
126     }
127 }