Path: blob/master/test/hotspot/jtreg/gtest/LargePageGtests.java
41145 views
/*1* Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.2* Copyright (c) 2020 SAP SE. 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 it6* under the terms of the GNU General Public License version 2 only, as7* published by the Free Software Foundation.8*9* This code is distributed in the hope that it will be useful, but WITHOUT10* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or11* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License12* version 2 for more details (a copy is included in the LICENSE file that13* accompanied this code).14*15* You should have received a copy of the GNU General Public License version16* 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 USA20* or visit www.oracle.com if you need additional information or have any21* questions.22*23*/2425/*26* This runs the parts of the gtest which make sense in large-page scenarios27* (mainly os*).28* Note that if these tests run on a system whose kernel supports large pages29* but where no huge pages are configured, these tests are still useful. They30* will test correct initialization. Later reserve calls will fail and fall31* back to small pages (while complaining loudly) but this should not affect32* the gtests. When tests complain, they would spew a lot of warning messages,33* which could blow out the test runner Java heaps. This is why we are running34* with -XX:-PrintWarnings.35*/3637/* @test id=use-large-pages38* @summary Run metaspace-related gtests for reclaim policy none (with verifications)39* @requires os.family == "linux" | os.family == "windows"40* @library /test/lib41* @modules java.base/jdk.internal.misc42* java.xml43* @requires vm.flagless44* @run main/native GTestWrapper --gtest_filter=os* -XX:-PrintWarnings -XX:+UseLargePages45*/4647/* @test id=use-large-pages-1G48* @summary Run metaspace-related gtests for reclaim policy none (with verifications)49* @requires os.family == "linux"50* @requires vm.bits == "64"51* @library /test/lib52* @modules java.base/jdk.internal.misc53* java.xml54* @requires vm.flagless55* @run main/native GTestWrapper --gtest_filter=os* -XX:-PrintWarnings -XX:+UseLargePages -XX:LargePageSizeInBytes=1G56*/5758/* @test id=use-large-pages-sysV59* @summary Run metaspace-related gtests for reclaim policy none (with verifications)60* @requires os.family == "linux"61* @library /test/lib62* @modules java.base/jdk.internal.misc63* java.xml64* @requires vm.flagless65* @run main/native GTestWrapper --gtest_filter=os* -XX:-PrintWarnings -XX:+UseLargePages -XX:+UseSHM66*/676869