Skip to content

Commit bbac91a

Browse files
committed
8257959: Add gtest run with -XX:+UseLargePages
Reviewed-by: lfoltan, tschatzl
1 parent 707bce0 commit bbac91a

File tree

2 files changed

+64
-1
lines changed

2 files changed

+64
-1
lines changed

test/hotspot/jtreg/TEST.groups

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ hotspot_containers = \
7676
tier1_common = \
7777
sanity/BasicVMTest.java \
7878
gtest/GTestWrapper.java \
79-
gtest/MetaspaceGtests.java
79+
gtest/MetaspaceGtests.java \
80+
gtest/LargePageGtests.java
8081

8182
tier1_compiler = \
8283
:tier1_compiler_1 \
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
/*
2+
* Copyright (c) 2020, 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.
34+
*/
35+
36+
/* @test id=use-large-pages
37+
* @summary Run metaspace-related gtests for reclaim policy none (with verifications)
38+
* @requires os.family == "linux" | os.family == "windows"
39+
* @library /test/lib
40+
* @modules java.base/jdk.internal.misc
41+
* java.xml
42+
* @run main/native GTestWrapper --gtest_filter=os* -XX:+UseLargePages
43+
*/
44+
45+
/* @test id=use-large-pages-1G
46+
* @summary Run metaspace-related gtests for reclaim policy none (with verifications)
47+
* @requires os.family == "linux"
48+
* @requires vm.bits == "64"
49+
* @library /test/lib
50+
* @modules java.base/jdk.internal.misc
51+
* java.xml
52+
* @run main/native GTestWrapper --gtest_filter=os* -XX:+UseLargePages -XX:LargePageSizeInBytes=1G
53+
*/
54+
55+
/* @test id=use-large-pages-sysV
56+
* @summary Run metaspace-related gtests for reclaim policy none (with verifications)
57+
* @requires os.family == "linux"
58+
* @library /test/lib
59+
* @modules java.base/jdk.internal.misc
60+
* java.xml
61+
* @run main/native GTestWrapper --gtest_filter=os* -XX:+UseLargePages -XX:+UseSHM
62+
*/

0 commit comments

Comments
 (0)