Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mobile
Path: blob/master/test/hotspot/jtreg/gc/CriticalNativeArgs.java
40930 views
1
/*
2
* Copyright (c) 2018, 2019, Red Hat, Inc. and/or its affiliates.
3
* Copyright (c) 2020, Oracle and/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;
27
28
/*
29
* @test CriticalNativeStressEpsilon
30
* @bug 8199868
31
* @library /
32
* @requires os.arch =="x86_64" | os.arch == "amd64" | os.arch=="x86" | os.arch=="i386"
33
* @requires vm.gc.Epsilon
34
* @summary test argument unpacking nmethod wrapper of critical native method
35
* @run main/othervm/native -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -Xcomp -Xmx256M
36
* -XX:-CriticalJNINatives
37
* gc.CriticalNativeArgs
38
* @run main/othervm/native -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -Xcomp -Xmx256M
39
* -XX:+CriticalJNINatives
40
* gc.CriticalNativeArgs
41
*/
42
43
/*
44
* @test CriticalNativeStressShenandoah
45
* @bug 8199868
46
* @library /
47
* @requires os.arch =="x86_64" | os.arch == "amd64" | os.arch=="x86" | os.arch=="i386"
48
* @requires vm.gc.Shenandoah
49
* @summary test argument unpacking nmethod wrapper of critical native method
50
*
51
* @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xcomp -Xmx512M
52
* -XX:+UseShenandoahGC
53
* -XX:-CriticalJNINatives
54
* gc.CriticalNativeArgs
55
* @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xcomp -Xmx512M
56
* -XX:+UseShenandoahGC
57
* -XX:+CriticalJNINatives
58
* gc.CriticalNativeArgs
59
*
60
* @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xcomp -Xmx512M
61
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=passive -XX:+ShenandoahDegeneratedGC
62
* -XX:+CriticalJNINatives
63
* gc.CriticalNativeArgs
64
* @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xcomp -Xmx512M
65
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=passive -XX:-ShenandoahDegeneratedGC
66
* -XX:+CriticalJNINatives
67
* gc.CriticalNativeArgs
68
*
69
* @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xcomp -Xmx512M
70
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive
71
* -XX:+CriticalJNINatives
72
* gc.CriticalNativeArgs
73
*
74
* @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xcomp -Xmx512M
75
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
76
* -XX:+CriticalJNINatives
77
* gc.CriticalNativeArgs
78
* @run main/othervm/native -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xcomp -Xmx512M
79
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
80
* -XX:+CriticalJNINatives
81
* gc.CriticalNativeArgs
82
*/
83
84
/*
85
* @test CriticalNativeStress
86
* @bug 8199868 8233343
87
* @library /
88
* @requires os.arch =="x86_64" | os.arch == "amd64" | os.arch=="x86" | os.arch=="i386" | os.arch=="ppc64" | os.arch=="ppc64le" | os.arch=="s390x"
89
* @summary test argument unpacking nmethod wrapper of critical native method
90
* @run main/othervm/native -Xcomp -Xmx512M
91
* -XX:-CriticalJNINatives
92
* gc.CriticalNativeArgs
93
* @run main/othervm/native -Xcomp -Xmx512M
94
* -XX:+CriticalJNINatives
95
* gc.CriticalNativeArgs
96
*/
97
public class CriticalNativeArgs {
98
public static void main(String[] args) {
99
int[] arr = new int[2];
100
101
if (CriticalNative.isNull(arr)) {
102
throw new RuntimeException("Should not be null");
103
}
104
105
if (!CriticalNative.isNull(null)) {
106
throw new RuntimeException("Should be null");
107
}
108
}
109
}
110
111