hotspot/test/compiler/codecache/stress/OverloadCompileQueueTest.java
changeset 40067 db6c74a53556
parent 40059 c2304140ed64
child 40631 ed82623d7831
equal deleted inserted replaced
40063:813343dec9dd 40067:db6c74a53556
    55 public class OverloadCompileQueueTest implements Runnable {
    55 public class OverloadCompileQueueTest implements Runnable {
    56     private static final int MAX_SLEEP = 10000;
    56     private static final int MAX_SLEEP = 10000;
    57     private static final String METHOD_TO_ENQUEUE = "method";
    57     private static final String METHOD_TO_ENQUEUE = "method";
    58     private static final int LEVEL_SIMPLE = 1;
    58     private static final int LEVEL_SIMPLE = 1;
    59     private static final int LEVEL_FULL_OPTIMIZATION = 4;
    59     private static final int LEVEL_FULL_OPTIMIZATION = 4;
    60     private static final boolean INTERPRETED
       
    61             = System.getProperty("java.vm.info").startsWith("interpreted ");
       
    62     private static final boolean TIERED_COMPILATION
    60     private static final boolean TIERED_COMPILATION
    63             = Helper.WHITE_BOX.getBooleanVMFlag("TieredCompilation");
    61             = Helper.WHITE_BOX.getBooleanVMFlag("TieredCompilation");
    64     private static final int TIERED_STOP_AT_LEVEL
    62     private static final int TIERED_STOP_AT_LEVEL
    65             = Helper.WHITE_BOX.getIntxVMFlag("TieredStopAtLevel").intValue();
    63             = Helper.WHITE_BOX.getIntxVMFlag("TieredStopAtLevel").intValue();
    66     private static final int[] AVAILABLE_LEVELS;
    64     private static final int[] AVAILABLE_LEVELS;
    72         } else if (Platform.isServer()) {
    70         } else if (Platform.isServer()) {
    73             AVAILABLE_LEVELS = new int[] { LEVEL_FULL_OPTIMIZATION };
    71             AVAILABLE_LEVELS = new int[] { LEVEL_FULL_OPTIMIZATION };
    74         } else if (Platform.isClient() || Platform.isMinimal()) {
    72         } else if (Platform.isClient() || Platform.isMinimal()) {
    75             AVAILABLE_LEVELS = new int[] { LEVEL_SIMPLE };
    73             AVAILABLE_LEVELS = new int[] { LEVEL_SIMPLE };
    76         } else {
    74         } else {
    77             throw new Error(String.format(
    75             throw new Error("TESTBUG: unknown VM: " + Platform.vmName);
    78                     "TESTBUG: unknown VM: %s", System.getProperty("java.vm.name")));
       
    79         }
    76         }
    80     }
    77     }
    81 
    78 
    82     public static void main(String[] args) {
    79     public static void main(String[] args) {
    83         if (INTERPRETED) {
    80         if (Platform.isInt()) {
    84             System.err.println("Test isn't applicable for interpreter. Skip test.");
    81             throw new Error("TESTBUG: test can not be run in interpreter");
    85             return;
       
    86         }
    82         }
    87         new CodeCacheStressRunner(new OverloadCompileQueueTest()).runTest();
    83         new CodeCacheStressRunner(new OverloadCompileQueueTest()).runTest();
    88     }
    84     }
    89 
    85 
    90     public OverloadCompileQueueTest() {
    86     public OverloadCompileQueueTest() {