< prev index next >

test/hotspot/jtreg/gc/g1/TestLargePageUseForHeap.java

Print this page
rev 59103 : imported patch hotspot


  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 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 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 package gc.g1;
  25 
  26 /*
  27  * @test TestLargePageUseForHeap.java
  28  * @summary Test that Java heap is allocated using large pages of the appropriate size if available.
  29  * @bug 8221517
  30  * @key gc
  31  * @modules java.base/jdk.internal.misc
  32  * @library /test/lib
  33  * @requires vm.gc.G1
  34  * @requires os.family != "solaris"
  35  * @build sun.hotspot.WhiteBox
  36  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  37  * @run main/othervm -Xbootclasspath/a:. -XX:+UseG1GC -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
  38         -XX:+IgnoreUnrecognizedVMOptions -XX:+UseLargePages gc.g1.TestLargePageUseForHeap
  39  */
  40 
  41 import jdk.test.lib.process.OutputAnalyzer;
  42 import jdk.test.lib.process.ProcessTools;
  43 import jtreg.SkippedException;
  44 import sun.hotspot.WhiteBox;
  45 
  46 public class TestLargePageUseForHeap {
  47     static long largePageSize;
  48     static long smallPageSize;
  49 
  50     static void checkSize(OutputAnalyzer output, long expectedSize, String pattern) {
  51         String pageSizeStr = output.firstMatch(pattern, 1);
  52 
  53         if (pageSizeStr == null) {
  54             output.reportDiagnosticSummary();




  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 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 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 package gc.g1;
  25 
  26 /*
  27  * @test TestLargePageUseForHeap.java
  28  * @summary Test that Java heap is allocated using large pages of the appropriate size if available.
  29  * @bug 8221517
  30  * @key gc
  31  * @modules java.base/jdk.internal.misc
  32  * @library /test/lib
  33  * @requires vm.gc.G1

  34  * @build sun.hotspot.WhiteBox
  35  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  36  * @run main/othervm -Xbootclasspath/a:. -XX:+UseG1GC -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
  37         -XX:+IgnoreUnrecognizedVMOptions -XX:+UseLargePages gc.g1.TestLargePageUseForHeap
  38  */
  39 
  40 import jdk.test.lib.process.OutputAnalyzer;
  41 import jdk.test.lib.process.ProcessTools;
  42 import jtreg.SkippedException;
  43 import sun.hotspot.WhiteBox;
  44 
  45 public class TestLargePageUseForHeap {
  46     static long largePageSize;
  47     static long smallPageSize;
  48 
  49     static void checkSize(OutputAnalyzer output, long expectedSize, String pattern) {
  50         String pageSizeStr = output.firstMatch(pattern, 1);
  51 
  52         if (pageSizeStr == null) {
  53             output.reportDiagnosticSummary();


< prev index next >