< prev index next >

test/hotspot/jtreg/gc/g1/plab/TestPLABPromotion.java

Print this page
*** 30,11 ***
   * @library /test/lib /
   * @modules java.base/jdk.internal.misc
   * @modules java.management
   * @build jdk.test.whitebox.WhiteBox
   * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
!  * @run main/timeout=240 gc.g1.plab.TestPLABPromotion
   */
  package gc.g1.plab;
  
  import java.util.List;
  import java.util.Arrays;
--- 30,11 ---
   * @library /test/lib /
   * @modules java.base/jdk.internal.misc
   * @modules java.management
   * @build jdk.test.whitebox.WhiteBox
   * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
!  * @run main/othervm/timeout=240 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI gc.g1.plab.TestPLABPromotion
   */
  package gc.g1.plab;
  
  import java.util.List;
  import java.util.Arrays;

*** 46,16 ***
--- 46,19 ---
  import gc.g1.plab.lib.PlabInfo;
  
  import jdk.test.lib.Platform;
  import jdk.test.lib.process.OutputAnalyzer;
  import jdk.test.lib.process.ProcessTools;
+ import jdk.test.whitebox.WhiteBox;
  
  /**
   * Test checks PLAB promotion of different size objects.
   */
  public class TestPLABPromotion {
  
+     private static final boolean COMPACT_HEADERS = Platform.is64bit() && WhiteBox.getWhiteBox().getBooleanVMFlag("UseCompactObjectHeaders");
+ 
      // GC ID with survivor PLAB statistics
      private final static long GC_ID_SURVIVOR_STATS = 1l;
      // GC ID with old PLAB statistics
      private final static long GC_ID_OLD_STATS = 2l;
  

*** 72,11 ***
      private static final int PLAB_SIZE_SMALL = 1024;
      private static final int PLAB_SIZE_MEDIUM = 4096;
      private static final int PLAB_SIZE_HIGH = 65536;
      private static final int OBJECT_SIZE_SMALL  = 10 * HEAP_WORD_SIZE;
      private static final int OBJECT_SIZE_MEDIUM = 128 * HEAP_WORD_SIZE;
!     private static final int OBJECT_SIZE_HIGH   = 3072 * HEAP_WORD_SIZE;
      private static final int GC_NUM_SMALL = 1;
      private static final int GC_NUM_MEDIUM = 3;
      private static final int GC_NUM_HIGH = 7;
      private static final int WASTE_PCT_SMALL = 10;
      private static final int WASTE_PCT_MEDIUM = 20;
--- 75,11 ---
      private static final int PLAB_SIZE_SMALL = 1024;
      private static final int PLAB_SIZE_MEDIUM = 4096;
      private static final int PLAB_SIZE_HIGH = 65536;
      private static final int OBJECT_SIZE_SMALL  = 10 * HEAP_WORD_SIZE;
      private static final int OBJECT_SIZE_MEDIUM = 128 * HEAP_WORD_SIZE;
!     private static final int OBJECT_SIZE_HIGH   = (COMPACT_HEADERS ? 3266 : 3250) * HEAP_WORD_SIZE;
      private static final int GC_NUM_SMALL = 1;
      private static final int GC_NUM_MEDIUM = 3;
      private static final int GC_NUM_HIGH = 7;
      private static final int WASTE_PCT_SMALL = 10;
      private static final int WASTE_PCT_MEDIUM = 20;
< prev index next >