1 /*
2 * Copyright (c) 2017, 2020, Red Hat, Inc. 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 *
59 *
60 * @run main/othervm -Xmx16m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
61 * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=static
62 * -XX:ConcGCThreads=2 -XX:ParallelGCThreads=4
63 * -Dtarget=1000
64 * TestGCThreadGroups
65 *
66 * @run main/othervm -Xmx16m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
67 * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=compact
68 * -XX:ConcGCThreads=2 -XX:ParallelGCThreads=4
69 * -Dtarget=100
70 * TestGCThreadGroups
71 *
72 * @run main/othervm -Xmx16m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
73 * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive
74 * -XX:ConcGCThreads=2 -XX:ParallelGCThreads=4
75 * -Dtarget=100
76 * TestGCThreadGroups
77 */
78
79 /**
80 * @test id=iu
81 * @summary Test Shenandoah GC uses concurrent/parallel threads correctly
82 * @requires vm.gc.Shenandoah
83 *
84 * @run main/othervm -Xmx16m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
85 * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
86 * -XX:ConcGCThreads=2 -XX:ParallelGCThreads=4
87 * -Dtarget=1000
88 * TestGCThreadGroups
89 *
90 * @run main/othervm -Xmx16m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
91 * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
92 * -XX:ConcGCThreads=2 -XX:ParallelGCThreads=4
93 * -Dtarget=1000
94 * TestGCThreadGroups
95 */
96
97 public class TestGCThreadGroups {
98
|
1 /*
2 * Copyright (c) 2017, 2020, 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 *
60 *
61 * @run main/othervm -Xmx16m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
62 * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=static
63 * -XX:ConcGCThreads=2 -XX:ParallelGCThreads=4
64 * -Dtarget=1000
65 * TestGCThreadGroups
66 *
67 * @run main/othervm -Xmx16m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
68 * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=compact
69 * -XX:ConcGCThreads=2 -XX:ParallelGCThreads=4
70 * -Dtarget=100
71 * TestGCThreadGroups
72 *
73 * @run main/othervm -Xmx16m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
74 * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive
75 * -XX:ConcGCThreads=2 -XX:ParallelGCThreads=4
76 * -Dtarget=100
77 * TestGCThreadGroups
78 */
79
80 /**
81 * @test id=generational
82 * @summary Test Shenandoah GC uses concurrent/parallel threads correctly
83 * @requires vm.gc.Shenandoah
84 *
85 * @run main/othervm -Xmx16m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
86 * -XX:+UseShenandoahGC
87 * -XX:ConcGCThreads=2 -XX:ParallelGCThreads=4
88 * -Dtarget=1000 -XX:ShenandoahGCMode=generational
89 * TestGCThreadGroups
90 *
91 * @run main/othervm -Xmx16m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
92 * -XX:+UseShenandoahGC
93 * -XX:-UseDynamicNumberOfGCThreads
94 * -Dtarget=1000 -XX:ShenandoahGCMode=generational
95 * TestGCThreadGroups
96 */
97
98 /**
99 * @test id=iu
100 * @summary Test Shenandoah GC uses concurrent/parallel threads correctly
101 * @requires vm.gc.Shenandoah
102 *
103 * @run main/othervm -Xmx16m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
104 * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
105 * -XX:ConcGCThreads=2 -XX:ParallelGCThreads=4
106 * -Dtarget=1000
107 * TestGCThreadGroups
108 *
109 * @run main/othervm -Xmx16m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
110 * -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
111 * -XX:ConcGCThreads=2 -XX:ParallelGCThreads=4
112 * -Dtarget=1000
113 * TestGCThreadGroups
114 */
115
116 public class TestGCThreadGroups {
117
|