< prev index next >

test/hotspot/jtreg/runtime/os/TestHugePageDetection.java

Print this page

 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  * @test
27  * @summary Test that the JVM detects the OS hugepage/THP settings correctly.
28  * @library /test/lib

29  * @requires os.family == "linux"
30  * @modules java.base/jdk.internal.misc
31  *          java.management
32  * @run driver TestHugePageDetection
33  */
34 
35 import java.util.*;
36 import jdk.test.lib.process.OutputAnalyzer;
37 import jdk.test.lib.process.ProcessTools;
38 
39 public class TestHugePageDetection {
40 
41     public static void main(String[] args) throws Exception {
42 
43         ArrayList<String> finalargs = new ArrayList<String>();
44         String[] defaultArgs = {
45             "-Xlog:pagesize", "-Xmx64M", "-XX:-CreateCoredumpOnCrash"
46         };
47         finalargs.addAll(Arrays.asList(defaultArgs));
48         finalargs.add("-version");

 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  * @test
27  * @summary Test that the JVM detects the OS hugepage/THP settings correctly.
28  * @library /test/lib
29  * @requires vm.flagless
30  * @requires os.family == "linux"
31  * @modules java.base/jdk.internal.misc
32  *          java.management
33  * @run driver TestHugePageDetection
34  */
35 
36 import java.util.*;
37 import jdk.test.lib.process.OutputAnalyzer;
38 import jdk.test.lib.process.ProcessTools;
39 
40 public class TestHugePageDetection {
41 
42     public static void main(String[] args) throws Exception {
43 
44         ArrayList<String> finalargs = new ArrayList<String>();
45         String[] defaultArgs = {
46             "-Xlog:pagesize", "-Xmx64M", "-XX:-CreateCoredumpOnCrash"
47         };
48         finalargs.addAll(Arrays.asList(defaultArgs));
49         finalargs.add("-version");
< prev index next >