< prev index next >

test/jdk/jdk/jfr/event/allocation/TestObjectAllocationOutsideTLABEvent.java

Print this page
*** 65,11 ***
      private static final String EVENT_NAME = EventNames.ObjectAllocationOutsideTLAB;
  
      // 64-bit  COH: MW8 +      L4 + End Alignment = 16
      // 64-bit -COH: MW8 + K4 + L4                 = 16
      // 32-bit     : MW4 + K4 + L4 + End Alignment = 16
!     private static final int BYTE_ARRAY_OVERHEAD = 16;
      private static final int OBJECT_SIZE = 128 * 1024;
  
      private static final int OBJECTS_TO_ALLOCATE = 100;
      private static final String BYTE_ARRAY_CLASS_NAME = new byte[0].getClass().getName();
      private static int eventCount;
--- 65,13 ---
      private static final String EVENT_NAME = EventNames.ObjectAllocationOutsideTLAB;
  
      // 64-bit  COH: MW8 +      L4 + End Alignment = 16
      // 64-bit -COH: MW8 + K4 + L4                 = 16
      // 32-bit     : MW4 + K4 + L4 + End Alignment = 16
!     private static final Boolean COMPACT_HEADERS = WhiteBox.getWhiteBox().getBooleanVMFlag("UseCompactObjectHeaders");
+ 
+     private static final int BYTE_ARRAY_OVERHEAD = COMPACT_HEADERS ? 12 : 16;
      private static final int OBJECT_SIZE = 128 * 1024;
  
      private static final int OBJECTS_TO_ALLOCATE = 100;
      private static final String BYTE_ARRAY_CLASS_NAME = new byte[0].getClass().getName();
      private static int eventCount;
< prev index next >