1 /*
2 * Copyright (c) 2016, 2018, Red Hat, Inc. 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
26 package gc.stress.gcbasher;
27
28 import java.io.IOException;
29
30 /*
31 * @test id=passive
32 * @key stress
33 * @library / /test/lib
34 * @requires vm.gc.Shenandoah
35 * @requires vm.flavor == "server"
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 id=aggressive
51 * @key stress
52 * @requires vm.gc.Shenandoah
53 * @requires vm.flavor == "server"
54 * @summary Stress the Shenandoah GC by trying to make old objects more likely to be garbage than young objects.
55 *
56 * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
57 * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive
58 * -XX:+ShenandoahOOMDuringEvacALot
59 * gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
60 *
61 * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
62 * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive
63 * -XX:+ShenandoahAllocFailureALot
64 * gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
65 *
66 * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
67 * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive
68 * gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
69 */
70
71 /*
72 * @test id=adaptive
73 * @key stress
74 * @library / /test/lib
75 * @requires vm.gc.Shenandoah
76 * @requires vm.flavor == "server"
77 * @summary Stress the Shenandoah GC by trying to make old objects more likely to be garbage than young objects.
78 *
79 * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
80 * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive
81 * -XX:+ShenandoahVerify
82 * gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
83 *
84 * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
85 * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive
86 * gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
87 */
88
89 /*
90 * @test id=compact
91 * @key stress
92 * @library / /test/lib
93 * @requires vm.gc.Shenandoah
94 * @requires vm.flavor == "server" & vm.opt.ClassUnloading != false
95 * @summary Stress Shenandoah GC with nmethod barrier forced deoptimization enabled.
96 *
97 * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
98 * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=compact
99 * gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
100 */
101
102 /*
103 * @test id=passive-deopt-nmethod
104 * @key stress
105 * @library / /test/lib
106 * @requires vm.gc.Shenandoah
107 * @requires vm.flavor == "server" & vm.opt.ClassUnloading != false
108 * @summary Stress Shenandoah GC with nmethod barrier forced deoptimization enabled.
109 *
110 * @run main/othervm/timeout=200 -Xlog:gc*=info,nmethod+barrier=trace -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
111 * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=passive
112 * -XX:+DeoptimizeNMethodBarriersALot -XX:-Inline
113 * -XX:+ShenandoahVerify -XX:+ShenandoahDegeneratedGC
114 * gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
115 *
116 * @run main/othervm/timeout=200 -Xlog:gc*=info,nmethod+barrier=trace -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
117 * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=passive
118 * -XX:+DeoptimizeNMethodBarriersALot -XX:-Inline
119 * -XX:+ShenandoahVerify -XX:-ShenandoahDegeneratedGC
120 * gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
121 */
122
123 /*
124 * @test id=aggressive-deopt-nmethod
125 * @key stress
126 * @library / /test/lib
127 * @requires vm.gc.Shenandoah
128 * @requires vm.flavor == "server" & vm.opt.ClassUnloading != false
129 * @summary Stress Shenandoah GC with nmethod barrier forced deoptimization enabled.
130 *
131 * @run main/othervm/timeout=200 -Xlog:gc*=info,nmethod+barrier=trace -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
132 * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive
133 * -XX:+DeoptimizeNMethodBarriersALot -XX:-Inline
134 * -XX:+ShenandoahOOMDuringEvacALot
135 * gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
136 *
137 * @run main/othervm/timeout=200 -Xlog:gc*=info,nmethod+barrier=trace -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
138 * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive
139 * -XX:+DeoptimizeNMethodBarriersALot -XX:-Inline
140 * -XX:+ShenandoahAllocFailureALot
141 * gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
142 *
143 * @run main/othervm/timeout=200 -Xlog:gc*=info,nmethod+barrier=trace -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
144 * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive
145 * -XX:+DeoptimizeNMethodBarriersALot -XX:-Inline
146 * gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
147 */
148
149 /*
150 * @test id=adaptive-deopt-nmethod
151 * @key stress
152 * @library / /test/lib
153 * @requires vm.gc.Shenandoah
154 * @requires vm.flavor == "server" & vm.opt.ClassUnloading != false
155 * @summary Stress Shenandoah GC with nmethod barrier forced deoptimization enabled.
156 *
157 * @run main/othervm/timeout=200 -Xlog:gc*=info,nmethod+barrier=trace -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
158 * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive
159 * -XX:+DeoptimizeNMethodBarriersALot -XX:-Inline
160 * -XX:+ShenandoahVerify
161 * gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
162 *
163 * @run main/othervm/timeout=200 -Xlog:gc*=info,nmethod+barrier=trace -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
164 * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive
165 * -XX:+DeoptimizeNMethodBarriersALot -XX:-Inline
166 * gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
167 */
168
169 /*
170 * @test id=compact-deopt-nmethod
171 * @key stress
172 * @library / /test/lib
173 * @requires vm.gc.Shenandoah
174 * @requires vm.flavor == "server" & vm.opt.ClassUnloading != false
175 * @summary Stress Shenandoah GC with nmethod barrier forced deoptimization enabled.
176 *
177 * @run main/othervm/timeout=200 -Xlog:gc*=info,nmethod+barrier=trace -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
178 * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=compact
179 * -XX:+DeoptimizeNMethodBarriersALot -XX:-Inline
180 * gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
181 */
182 /*
183 * @test id=generational
184 * @key stress
185 * @library / /test/lib
186 * @requires vm.gc.Shenandoah
187 * @requires vm.flavor == "server"
188 * @summary Stress the Shenandoah GC by trying to make old objects more likely to be garbage than young objects.
189 *
190 * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
191 * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=generational
192 * -XX:+ShenandoahVerify
193 * gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
194 *
195 * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
196 * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=generational
197 * gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
198 */
199
200 /*
201 * @test id=generational-deopt-nmethod
202 * @key stress
203 * @library / /test/lib
204 * @requires vm.gc.Shenandoah
205 * @requires vm.flavor == "server" & vm.opt.ClassUnloading != false
206 * @summary Stress Shenandoah GC with nmethod barrier forced deoptimization enabled.
207 *
208 * @run main/othervm/timeout=200 -Xlog:gc*=info,nmethod+barrier=trace -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
209 * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=generational
210 * -XX:+DeoptimizeNMethodBarriersALot -XX:-Inline
211 * -XX:+ShenandoahVerify
212 * gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
213 *
214 * @run main/othervm/timeout=200 -Xlog:gc*=info,nmethod+barrier=trace -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
215 * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=generational
216 * -XX:+DeoptimizeNMethodBarriersALot -XX:-Inline
217 * gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
218 */
219
220 public class TestGCBasherWithShenandoah {
221 public static void main(String[] args) throws IOException {
222 TestGCBasher.main(args);
223 }
224 }