Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mobile
Path: blob/master/test/hotspot/jtreg/gtest/LargePageGtests.java
41145 views
1
/*
2
* Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
3
* Copyright (c) 2020 SAP SE. 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
/*
27
* This runs the parts of the gtest which make sense in large-page scenarios
28
* (mainly os*).
29
* Note that if these tests run on a system whose kernel supports large pages
30
* but where no huge pages are configured, these tests are still useful. They
31
* will test correct initialization. Later reserve calls will fail and fall
32
* back to small pages (while complaining loudly) but this should not affect
33
* the gtests. When tests complain, they would spew a lot of warning messages,
34
* which could blow out the test runner Java heaps. This is why we are running
35
* with -XX:-PrintWarnings.
36
*/
37
38
/* @test id=use-large-pages
39
* @summary Run metaspace-related gtests for reclaim policy none (with verifications)
40
* @requires os.family == "linux" | os.family == "windows"
41
* @library /test/lib
42
* @modules java.base/jdk.internal.misc
43
* java.xml
44
* @requires vm.flagless
45
* @run main/native GTestWrapper --gtest_filter=os* -XX:-PrintWarnings -XX:+UseLargePages
46
*/
47
48
/* @test id=use-large-pages-1G
49
* @summary Run metaspace-related gtests for reclaim policy none (with verifications)
50
* @requires os.family == "linux"
51
* @requires vm.bits == "64"
52
* @library /test/lib
53
* @modules java.base/jdk.internal.misc
54
* java.xml
55
* @requires vm.flagless
56
* @run main/native GTestWrapper --gtest_filter=os* -XX:-PrintWarnings -XX:+UseLargePages -XX:LargePageSizeInBytes=1G
57
*/
58
59
/* @test id=use-large-pages-sysV
60
* @summary Run metaspace-related gtests for reclaim policy none (with verifications)
61
* @requires os.family == "linux"
62
* @library /test/lib
63
* @modules java.base/jdk.internal.misc
64
* java.xml
65
* @requires vm.flagless
66
* @run main/native GTestWrapper --gtest_filter=os* -XX:-PrintWarnings -XX:+UseLargePages -XX:+UseSHM
67
*/
68
69