1 /*
2 * Copyright (c) 2016, 2020, Oracle and/or its affiliates. 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 package gc.stress.gcold;
25
26 /*
27 * @test id=passive
28 * @key stress randomness
29 * @library / /test/lib
30 * @requires vm.gc.Shenandoah
31 * @summary Stress the GC by trying to make old objects more likely to be garbage than young objects.
32 *
33 * @run main/othervm/timeout=600 -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
34 * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=passive
35 * -XX:+ShenandoahDegeneratedGC -XX:+ShenandoahVerify
36 * gc.stress.gcold.TestGCOld 50 1 20 10 10000
37 *
38 * @run main/othervm/timeout=600 -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
39 * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=passive
40 * -XX:-ShenandoahDegeneratedGC -XX:+ShenandoahVerify
41 * gc.stress.gcold.TestGCOld 50 1 20 10 10000
42 *
43 * @run main/othervm/timeout=600 -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
44 * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=passive
45 * -XX:+ShenandoahDegeneratedGC
46 * gc.stress.gcold.TestGCOld 50 1 20 10 10000
47 *
48 * @run main/othervm/timeout=600 -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
49 * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=passive
50 * -XX:-ShenandoahDegeneratedGC
51 * gc.stress.gcold.TestGCOld 50 1 20 10 10000
52 */
53
54 /*
55 * @test id=aggressive
56 * @key stress randomness
57 * @library / /test/lib
58 * @requires vm.gc.Shenandoah
59 * @summary Stress the GC by trying to make old objects more likely to be garbage than young objects.
60 *
61 * @run main/othervm -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
62 * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive
63 * -XX:+ShenandoahOOMDuringEvacALot
64 * gc.stress.gcold.TestGCOld 50 1 20 10 10000
65 *
66 * @run main/othervm -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
67 * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive
68 * -XX:+ShenandoahAllocFailureALot
69 * gc.stress.gcold.TestGCOld 50 1 20 10 10000
70 *
71 * @run main/othervm -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
72 * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive
73 * gc.stress.gcold.TestGCOld 50 1 20 10 10000
74 */
75
76 /*
77 * @test id=adaptive
78 * @key stress randomness
79 * @library / /test/lib
80 * @requires vm.gc.Shenandoah
81 * @summary Stress the GC by trying to make old objects more likely to be garbage than young objects.
82 *
83 * @run main/othervm/timeout=600 -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
84 * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive
85 * -XX:+ShenandoahVerify
86 * gc.stress.gcold.TestGCOld 50 1 20 10 10000
87 *
88 * @run main/othervm -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
89 * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive
90 * gc.stress.gcold.TestGCOld 50 1 20 10 10000
91 */
92
93 /*
94 * @test id=compact
95 * @key stress randomness
96 * @library / /test/lib
97 * @requires vm.gc.Shenandoah
98 * @summary Stress the GC by trying to make old objects more likely to be garbage than young objects.
99 *
100 * @run main/othervm -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
101 * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=compact
102 * gc.stress.gcold.TestGCOld 50 1 20 10 10000
103 */
104
105 public class TestGCOldWithShenandoah {
106
107 public static void main(String[] args) {
108 TestGCOld.main(args);
109 }
110 }