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" & !vm.emulatedClient 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" & !vm.emulatedClient 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" & !vm.emulatedClient 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.emulatedClient & 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=iu-aggressive 105 * @key stress 106 * @library / 107 * @requires vm.gc.Shenandoah 108 * @requires vm.flavor == "server" & !vm.emulatedClient 109 * @summary Stress the Shenandoah GC by trying to make old objects more likely to be garbage than young objects. 110 * 111 * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions 112 * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive 113 * -XX:+ShenandoahOOMDuringEvacALot 114 * gc.stress.gcbasher.TestGCBasherWithShenandoah 120000 115 * 116 * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions 117 * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive 118 * -XX:+ShenandoahAllocFailureALot 119 * gc.stress.gcbasher.TestGCBasherWithShenandoah 120000 120 * 121 * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions 122 * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive 123 * gc.stress.gcbasher.TestGCBasherWithShenandoah 120000 124 */ 125 126 /* 127 * @test id=iu 128 * @key stress 129 * @library / 130 * @requires vm.gc.Shenandoah 131 * @requires vm.flavor == "server" & !vm.emulatedClient 132 * @summary Stress the Shenandoah GC by trying to make old objects more likely to be garbage than young objects. 133 * 134 * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions 135 * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu 136 * -XX:+ShenandoahVerify 137 * gc.stress.gcbasher.TestGCBasherWithShenandoah 120000 138 * 139 * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions 140 * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu 141 * gc.stress.gcbasher.TestGCBasherWithShenandoah 120000 142 */ 143 144 /* 145 * @test id=passive-deopt-nmethod 146 * @key stress 147 * @library / 148 * @requires vm.gc.Shenandoah 149 * @requires vm.flavor == "server" & !vm.emulatedClient & vm.opt.ClassUnloading != false 150 * @summary Stress Shenandoah GC with nmethod barrier forced deoptimization enabled. 151 * 152 * @run main/othervm/timeout=200 -Xlog:gc*=info,nmethod+barrier=trace -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions 153 * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=passive 154 * -XX:+DeoptimizeNMethodBarriersALot -XX:-Inline 155 * -XX:+ShenandoahVerify -XX:+ShenandoahDegeneratedGC 156 * gc.stress.gcbasher.TestGCBasherWithShenandoah 120000 157 * 158 * @run main/othervm/timeout=200 -Xlog:gc*=info,nmethod+barrier=trace -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions 159 * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=passive 160 * -XX:+DeoptimizeNMethodBarriersALot -XX:-Inline 161 * -XX:+ShenandoahVerify -XX:-ShenandoahDegeneratedGC 162 * gc.stress.gcbasher.TestGCBasherWithShenandoah 120000 163 */ 164 165 /* 166 * @test id=aggressive-deopt-nmethod 167 * @key stress 168 * @library / 169 * @requires vm.gc.Shenandoah 170 * @requires vm.flavor == "server" & !vm.emulatedClient & vm.opt.ClassUnloading != false 171 * @summary Stress Shenandoah GC with nmethod barrier forced deoptimization enabled. 172 * 173 * @run main/othervm/timeout=200 -Xlog:gc*=info,nmethod+barrier=trace -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions 174 * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive 175 * -XX:+DeoptimizeNMethodBarriersALot -XX:-Inline 176 * -XX:+ShenandoahOOMDuringEvacALot 177 * gc.stress.gcbasher.TestGCBasherWithShenandoah 120000 178 * 179 * @run main/othervm/timeout=200 -Xlog:gc*=info,nmethod+barrier=trace -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions 180 * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive 181 * -XX:+DeoptimizeNMethodBarriersALot -XX:-Inline 182 * -XX:+ShenandoahAllocFailureALot 183 * gc.stress.gcbasher.TestGCBasherWithShenandoah 120000 184 * 185 * @run main/othervm/timeout=200 -Xlog:gc*=info,nmethod+barrier=trace -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions 186 * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive 187 * -XX:+DeoptimizeNMethodBarriersALot -XX:-Inline 188 * gc.stress.gcbasher.TestGCBasherWithShenandoah 120000 189 */ 190 191 /* 192 * @test id=adaptive-deopt-nmethod 193 * @key stress 194 * @library / 195 * @requires vm.gc.Shenandoah 196 * @requires vm.flavor == "server" & !vm.emulatedClient & vm.opt.ClassUnloading != false 197 * @summary Stress Shenandoah GC with nmethod barrier forced deoptimization enabled. 198 * 199 * @run main/othervm/timeout=200 -Xlog:gc*=info,nmethod+barrier=trace -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions 200 * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive 201 * -XX:+DeoptimizeNMethodBarriersALot -XX:-Inline 202 * -XX:+ShenandoahVerify 203 * gc.stress.gcbasher.TestGCBasherWithShenandoah 120000 204 * 205 * @run main/othervm/timeout=200 -Xlog:gc*=info,nmethod+barrier=trace -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions 206 * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive 207 * -XX:+DeoptimizeNMethodBarriersALot -XX:-Inline 208 * gc.stress.gcbasher.TestGCBasherWithShenandoah 120000 209 */ 210 211 /* 212 * @test id=compact-deopt-nmethod 213 * @key stress 214 * @library / 215 * @requires vm.gc.Shenandoah 216 * @requires vm.flavor == "server" & !vm.emulatedClient & vm.opt.ClassUnloading != false 217 * @summary Stress Shenandoah GC with nmethod barrier forced deoptimization enabled. 218 * 219 * @run main/othervm/timeout=200 -Xlog:gc*=info,nmethod+barrier=trace -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions 220 * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=compact 221 * -XX:+DeoptimizeNMethodBarriersALot -XX:-Inline 222 * gc.stress.gcbasher.TestGCBasherWithShenandoah 120000 223 */ 224 225 /* 226 * @test id=iu-aggressive-deopt-nmethod 227 * @key stress 228 * @library / 229 * @requires vm.gc.Shenandoah 230 * @requires vm.flavor == "server" & !vm.emulatedClient & vm.opt.ClassUnloading != false 231 * @summary Stress Shenandoah GC with nmethod barrier forced deoptimization enabled. 232 * 233 * @run main/othervm/timeout=200 -Xlog:gc*=info,nmethod+barrier=trace -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions 234 * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive 235 * -XX:+DeoptimizeNMethodBarriersALot -XX:-Inline 236 * -XX:+ShenandoahOOMDuringEvacALot 237 * gc.stress.gcbasher.TestGCBasherWithShenandoah 120000 238 * 239 * @run main/othervm/timeout=200 -Xlog:gc*=info,nmethod+barrier=trace -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions 240 * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive 241 * -XX:+DeoptimizeNMethodBarriersALot -XX:-Inline 242 * -XX:+ShenandoahAllocFailureALot 243 * gc.stress.gcbasher.TestGCBasherWithShenandoah 120000 244 * 245 * @run main/othervm/timeout=200 -Xlog:gc*=info,nmethod+barrier=trace -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions 246 * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive 247 * -XX:+DeoptimizeNMethodBarriersALot -XX:-Inline 248 * gc.stress.gcbasher.TestGCBasherWithShenandoah 120000 249 */ 250 251 /* 252 * @test id=iu-deopt-nmethod 253 * @key stress 254 * @library / 255 * @requires vm.gc.Shenandoah 256 * @requires vm.flavor == "server" & !vm.emulatedClient & vm.opt.ClassUnloading != false 257 * @summary Stress Shenandoah GC with nmethod barrier forced deoptimization enabled. 258 * 259 * @run main/othervm/timeout=200 -Xlog:gc*=info,nmethod+barrier=trace -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions 260 * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu 261 * -XX:+DeoptimizeNMethodBarriersALot -XX:-Inline 262 * -XX:+ShenandoahVerify 263 * gc.stress.gcbasher.TestGCBasherWithShenandoah 120000 264 * 265 * @run main/othervm/timeout=200 -Xlog:gc*=info,nmethod+barrier=trace -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions 266 * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu 267 * -XX:+DeoptimizeNMethodBarriersALot -XX:-Inline 268 * gc.stress.gcbasher.TestGCBasherWithShenandoah 120000 269 */ 270 271 /* 272 * @test id=generational 273 * @key stress 274 * @library / 275 * @requires vm.gc.Shenandoah 276 * @requires vm.flavor == "server" & !vm.emulatedClient 277 * @summary Stress the Shenandoah GC by trying to make old objects more likely to be garbage than young objects. 278 * 279 * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions 280 * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=generational 281 * -XX:+ShenandoahVerify 282 * gc.stress.gcbasher.TestGCBasherWithShenandoah 120000 283 * 284 * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions 285 * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=generational 286 * gc.stress.gcbasher.TestGCBasherWithShenandoah 120000 287 */ 288 289 /* 290 * @test id=generational-deopt-nmethod 291 * @key stress 292 * @library / 293 * @requires vm.gc.Shenandoah 294 * @requires vm.flavor == "server" & !vm.emulatedClient & vm.opt.ClassUnloading != false 295 * @summary Stress Shenandoah GC with nmethod barrier forced deoptimization enabled. 296 * 297 * @run main/othervm/timeout=200 -Xlog:gc*=info,nmethod+barrier=trace -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions 298 * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=generational 299 * -XX:+DeoptimizeNMethodBarriersALot -XX:-Inline 300 * -XX:+ShenandoahVerify 301 * gc.stress.gcbasher.TestGCBasherWithShenandoah 120000 302 * 303 * @run main/othervm/timeout=200 -Xlog:gc*=info,nmethod+barrier=trace -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions 304 * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=generational 305 * -XX:+DeoptimizeNMethodBarriersALot -XX:-Inline 306 * gc.stress.gcbasher.TestGCBasherWithShenandoah 120000 307 */ 308 309 public class TestGCBasherWithShenandoah { 310 public static void main(String[] args) throws IOException { 311 TestGCBasher.main(args); 312 } 313 } --- EOF ---