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