< prev index next >

test/runtime/valhalla/valuetypes/ValueTypeDensity.java

Print this page
rev 10541 : remove -Xint from runtime tests + force TieredCompilation off


  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 import java.lang.management.MemoryPoolMXBean;
  26 
  27 import sun.hotspot.WhiteBox;
  28 import jdk.test.lib.Asserts;
  29 
  30 /**
  31  * @test ValueTypeDensity
  32  * @summary Heap density test for ValueTypes
  33  * @library /testlibrary /test/lib
  34  * @build sun.hotspot.WhiteBox
  35  *        ValueTypeDensity
  36  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  37  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  38  * @run main/othervm -noverify -Xint -XX:+ValueArrayFlatten -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI ValueTypeDensity
  39  */
  40 
  41 public class ValueTypeDensity {
  42 
  43     private static final WhiteBox WHITE_BOX = WhiteBox.getWhiteBox();
  44 
  45     public ValueTypeDensity() {
  46         if (!WHITE_BOX.getBooleanVMFlag("ValueArrayFlatten")) {
  47             throw new IllegalStateException("ValueArrayFlatten false");
  48         }
  49     }
  50 
  51     interface LocalDate {
  52         public int getYear();
  53         public short getMonth();
  54         public short getDay();
  55     }
  56 
  57     interface LocalTime {
  58         public byte getHour();




  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 import java.lang.management.MemoryPoolMXBean;
  26 
  27 import sun.hotspot.WhiteBox;
  28 import jdk.test.lib.Asserts;
  29 
  30 /**
  31  * @test ValueTypeDensity
  32  * @summary Heap density test for ValueTypes
  33  * @library /testlibrary /test/lib
  34  * @build sun.hotspot.WhiteBox
  35  *        ValueTypeDensity
  36  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  37  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  38  * @run main/othervm -noverify -XX:+ValueArrayFlatten -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI ValueTypeDensity
  39  */
  40 
  41 public class ValueTypeDensity {
  42 
  43     private static final WhiteBox WHITE_BOX = WhiteBox.getWhiteBox();
  44 
  45     public ValueTypeDensity() {
  46         if (!WHITE_BOX.getBooleanVMFlag("ValueArrayFlatten")) {
  47             throw new IllegalStateException("ValueArrayFlatten false");
  48         }
  49     }
  50 
  51     interface LocalDate {
  52         public int getYear();
  53         public short getMonth();
  54         public short getDay();
  55     }
  56 
  57     interface LocalTime {
  58         public byte getHour();


< prev index next >