test/hotspot/jtreg/runtime/memory/LargePages/TestLargePagesFlags.java
changeset 51287 7b1ddbafa134
parent 50525 767cdb97f103
child 51289 531de4cbaa4f
equal deleted inserted replaced
51286:744f731e9e8c 51287:7b1ddbafa134
     1 /*
     1 /*
     2  * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    22  */
    22  */
    23 
    23 
    24 /* @test TestLargePagesFlags
    24 /* @test TestLargePagesFlags
    25  * @summary Tests how large pages are choosen depending on the given large pages flag combinations.
    25  * @summary Tests how large pages are choosen depending on the given large pages flag combinations.
    26  * @requires vm.gc != "Z"
    26  * @requires vm.gc != "Z"
       
    27  * @requires vm.family == "linux"
    27  * @library /test/lib
    28  * @library /test/lib
    28  * @modules java.base/jdk.internal.misc
    29  * @modules java.base/jdk.internal.misc
    29  *          java.management
    30  *          java.management
    30  * @run main TestLargePagesFlags
    31  * @run main TestLargePagesFlags
    31  */
    32  */
    32 
    33 
    33 import jdk.test.lib.process.OutputAnalyzer;
    34 import jdk.test.lib.process.OutputAnalyzer;
    34 import jdk.test.lib.Platform;
    35 import jdk.test.lib.Platform;
    35 import jdk.test.lib.process.ProcessTools;
    36 import jdk.test.lib.process.ProcessTools;
       
    37 
    36 import java.util.ArrayList;
    38 import java.util.ArrayList;
    37 
    39 
    38 public class TestLargePagesFlags {
    40 public class TestLargePagesFlags {
    39 
    41 
    40   public static void main(String [] args) throws Exception {
    42   public static void main(String [] args) throws Exception {
    41     if (!Platform.isLinux()) {
       
    42       System.out.println("Skipping. TestLargePagesFlags has only been implemented for Linux.");
       
    43       return;
       
    44     }
       
    45 
       
    46     testUseTransparentHugePages();
    43     testUseTransparentHugePages();
    47     testUseHugeTLBFS();
    44     testUseHugeTLBFS();
    48     testUseSHM();
    45     testUseSHM();
    49     testCombinations();
    46     testCombinations();
    50   }
    47   }