< prev index next >

test/gc/g1/TestLargePageUseForAuxMemory.java

Print this page
rev 9290 : [mq]: add_option


  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 /*
  25  * @test TestLargePageUseForAuxMemory.java
  26  * @summary Test that auxiliary data structures are allocated using large pages if available.
  27  * @bug 8058354 8079208
  28  * @key gc
  29  * @library /testlibrary /test/lib
  30  * @requires (vm.gc=="G1" | vm.gc=="null")
  31  * @build jdk.test.lib.* sun.hotspot.WhiteBox
  32  * @build TestLargePageUseForAuxMemory
  33  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  34  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  35  * @run main/othervm -Xbootclasspath/a:. -XX:+UseG1GC -XX:+WhiteBoxAPI -XX:+IgnoreUnrecognizedVMOptions -XX:+UseLargePages TestLargePageUseForAuxMemory
  36  */
  37 
  38 import java.lang.Math;
  39 
  40 import jdk.test.lib.*;
  41 import jdk.test.lib.Asserts;
  42 import sun.hotspot.WhiteBox;
  43 
  44 public class TestLargePageUseForAuxMemory {
  45     static final long HEAP_REGION_SIZE = 1 * 1024 * 1024;
  46     static long largePageSize;
  47     static long smallPageSize;
  48     static long allocGranularity;
  49 
  50     static void checkSmallTables(OutputAnalyzer output, long expectedPageSize) throws Exception {
  51         output.shouldContain("G1 'Block offset table': pg_sz=" + expectedPageSize);
  52         output.shouldContain("G1 'Card counts table': pg_sz=" + expectedPageSize);
  53     }
  54 
  55     static void checkBitmaps(OutputAnalyzer output, long expectedPageSize) throws Exception {




  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 /*
  25  * @test TestLargePageUseForAuxMemory.java
  26  * @summary Test that auxiliary data structures are allocated using large pages if available.
  27  * @bug 8058354 8079208
  28  * @key gc
  29  * @library /testlibrary /test/lib
  30  * @requires (vm.gc=="G1" | vm.gc=="null")
  31  * @build jdk.test.lib.* sun.hotspot.WhiteBox
  32  * @build TestLargePageUseForAuxMemory
  33  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  34  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  35  * @run main/othervm -Xbootclasspath/a:. -XX:+UseG1GC -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:+IgnoreUnrecognizedVMOptions -XX:+UseLargePages TestLargePageUseForAuxMemory
  36  */
  37 
  38 import java.lang.Math;
  39 
  40 import jdk.test.lib.*;
  41 import jdk.test.lib.Asserts;
  42 import sun.hotspot.WhiteBox;
  43 
  44 public class TestLargePageUseForAuxMemory {
  45     static final long HEAP_REGION_SIZE = 1 * 1024 * 1024;
  46     static long largePageSize;
  47     static long smallPageSize;
  48     static long allocGranularity;
  49 
  50     static void checkSmallTables(OutputAnalyzer output, long expectedPageSize) throws Exception {
  51         output.shouldContain("G1 'Block offset table': pg_sz=" + expectedPageSize);
  52         output.shouldContain("G1 'Card counts table': pg_sz=" + expectedPageSize);
  53     }
  54 
  55     static void checkBitmaps(OutputAnalyzer output, long expectedPageSize) throws Exception {


< prev index next >