Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/jdk17u
Path: blob/master/test/hotspot/jtreg/gc/TestSystemGC.java
64438 views
1
/*
2
* Copyright (c) 2013, 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;
25
26
/*
27
* @test id=Serial
28
* @requires vm.gc.Serial
29
* @summary Runs System.gc() with different flags.
30
* @run main/othervm -XX:+UseSerialGC gc.TestSystemGC
31
* @run main/othervm -XX:+UseSerialGC -XX:+UseLargePages gc.TestSystemGC
32
*/
33
34
/*
35
* @test id=Parallel
36
* @requires vm.gc.Parallel
37
* @summary Runs System.gc() with different flags.
38
* @run main/othervm -XX:+UseParallelGC gc.TestSystemGC
39
* @run main/othervm -XX:+UseParallelGC -XX:+UseLargePages gc.TestSystemGC
40
*/
41
42
/*
43
* @test id=G1
44
* @requires vm.gc.G1
45
* @summary Runs System.gc() with different flags.
46
* @run main/othervm -XX:+UseG1GC gc.TestSystemGC
47
* @run main/othervm -XX:+UseG1GC -XX:+ExplicitGCInvokesConcurrent gc.TestSystemGC
48
* @run main/othervm -XX:+UseG1GC -XX:+UseLargePages gc.TestSystemGC
49
*/
50
51
/*
52
* @test id=Shenandoah
53
* @requires vm.gc.Shenandoah
54
* @summary Runs System.gc() with different flags.
55
* @run main/othervm -XX:+UseShenandoahGC gc.TestSystemGC
56
* @run main/othervm -XX:+UseShenandoahGC -XX:+ExplicitGCInvokesConcurrent gc.TestSystemGC
57
* @run main/othervm -XX:+UseShenandoahGC -XX:+UseLargePages gc.TestSystemGC
58
*/
59
60
/*
61
* @test id=Z
62
* @requires vm.gc.Z
63
* @comment ZGC will not start when LargePages cannot be allocated, therefore
64
* we do not run such configuration.
65
* @summary Runs System.gc() with different flags.
66
* @run main/othervm -XX:+UseZGC gc.TestSystemGC
67
*/
68
69
public class TestSystemGC {
70
public static void main(String args[]) throws Exception {
71
System.gc();
72
}
73
}
74
75