< prev index next >

test/hotspot/jtreg/compiler/valhalla/valuetypes/ValueTypeTest.java

Print this page




 189     protected static final String ALLOCA_G = "(.*call,static  wrapper for: _new_array_Java" + END;
 190     // Value type allocation
 191     protected static final String ALLOC  = "(.*precise klass compiler/valhalla/valuetypes/MyValue.*\\R(.*(nop|spill).*\\R)*.*_new_instance_Java" + END;
 192     protected static final String ALLOCA = "(.*precise klass \\[Lcompiler/valhalla/valuetypes/MyValue.*\\R(.*(nop|spill).*\\R)*.*_new_array_Java" + END;
 193     protected static final String LOAD   = START + "Load(B|S|I|L|F|D|P|N)" + MID + "@compiler/valhalla/valuetypes/MyValue.*" + END;
 194     protected static final String LOADK  = START + "LoadK" + MID + END;
 195     protected static final String STORE  = START + "Store(B|C|S|I|L|F|D|P|N)" + MID + "@compiler/valhalla/valuetypes/MyValue.*" + END;
 196     protected static final String LOOP   = START + "Loop" + MID + "" + END;
 197     protected static final String COUNTEDLOOP = START + "CountedLoop\\b" + MID + "" + END;
 198     protected static final String TRAP   = START + "CallStaticJava" + MID + "uncommon_trap.*(unstable_if|predicate)" + END;
 199     protected static final String RETURN = START + "Return" + MID + "returns" + END;
 200     protected static final String LINKTOSTATIC = START + "CallStaticJava" + MID + "linkToStatic" + END;
 201     protected static final String NPE = START + "CallStaticJava" + MID + "null_check" + END;
 202     protected static final String CALL = START + "CallStaticJava" + MID + END;
 203     protected static final String STOREVALUETYPEFIELDS = START + "CallStaticJava" + MID + "store_value_type_fields" + END;
 204     protected static final String SCOBJ = "(.*# ScObj.*" + END;
 205     protected static final String LOAD_UNKNOWN_VALUE = "(.*call_leaf,runtime  load_unknown_value.*" + END;
 206     protected static final String STORE_UNKNOWN_VALUE = "(.*call_leaf,runtime  store_unknown_value.*" + END;
 207     protected static final String VALUE_ARRAY_NULL_GUARD = "(.*call,static  wrapper for: uncommon_trap.*reason='null_check' action='none'.*" + END;
 208     protected static final String STORAGE_PROPERTY_CLEARING = "(.*((int:536870911)|(salq.*3\\R.*sarq.*3)).*" + END;

 209 
 210     public static String[] concat(String prefix[], String... extra) {
 211         ArrayList<String> list = new ArrayList<String>();
 212         if (prefix != null) {
 213             for (String s : prefix) {
 214                 list.add(s);
 215             }
 216         }
 217         if (extra != null) {
 218             for (String s : extra) {
 219                 list.add(s);
 220             }
 221         }
 222 
 223         return list.toArray(new String[list.size()]);
 224     }
 225 
 226     /**
 227      * Override getNumScenarios and getVMParameters if you want to run with more than
 228      * the 6 built-in scenarios


 736             } else if (compLevel == COMP_LEVEL_FULL_OPTIMIZATION) {
 737                 compLevel = COMP_LEVEL_SIMPLE;
 738             }
 739         }
 740         if (!TEST_C1 && compLevel < COMP_LEVEL_FULL_OPTIMIZATION) {
 741             compLevel = COMP_LEVEL_FULL_OPTIMIZATION;
 742         }
 743         if (compLevel > (int)TieredStopAtLevel) {
 744             compLevel = (int)TieredStopAtLevel;
 745         }
 746         return compLevel;
 747     }
 748 
 749     public static void enqueueMethodForCompilation(Method m, int level) {
 750         level = restrictCompLevel(level);
 751         if (VERBOSE) {
 752             System.out.println("enqueueMethodForCompilation " + m + ", level = " + level);
 753         }
 754         WHITE_BOX.enqueueMethodForCompilation(m, level);
 755     }







 756 }


 189     protected static final String ALLOCA_G = "(.*call,static  wrapper for: _new_array_Java" + END;
 190     // Value type allocation
 191     protected static final String ALLOC  = "(.*precise klass compiler/valhalla/valuetypes/MyValue.*\\R(.*(nop|spill).*\\R)*.*_new_instance_Java" + END;
 192     protected static final String ALLOCA = "(.*precise klass \\[Lcompiler/valhalla/valuetypes/MyValue.*\\R(.*(nop|spill).*\\R)*.*_new_array_Java" + END;
 193     protected static final String LOAD   = START + "Load(B|S|I|L|F|D|P|N)" + MID + "@compiler/valhalla/valuetypes/MyValue.*" + END;
 194     protected static final String LOADK  = START + "LoadK" + MID + END;
 195     protected static final String STORE  = START + "Store(B|C|S|I|L|F|D|P|N)" + MID + "@compiler/valhalla/valuetypes/MyValue.*" + END;
 196     protected static final String LOOP   = START + "Loop" + MID + "" + END;
 197     protected static final String COUNTEDLOOP = START + "CountedLoop\\b" + MID + "" + END;
 198     protected static final String TRAP   = START + "CallStaticJava" + MID + "uncommon_trap.*(unstable_if|predicate)" + END;
 199     protected static final String RETURN = START + "Return" + MID + "returns" + END;
 200     protected static final String LINKTOSTATIC = START + "CallStaticJava" + MID + "linkToStatic" + END;
 201     protected static final String NPE = START + "CallStaticJava" + MID + "null_check" + END;
 202     protected static final String CALL = START + "CallStaticJava" + MID + END;
 203     protected static final String STOREVALUETYPEFIELDS = START + "CallStaticJava" + MID + "store_value_type_fields" + END;
 204     protected static final String SCOBJ = "(.*# ScObj.*" + END;
 205     protected static final String LOAD_UNKNOWN_VALUE = "(.*call_leaf,runtime  load_unknown_value.*" + END;
 206     protected static final String STORE_UNKNOWN_VALUE = "(.*call_leaf,runtime  store_unknown_value.*" + END;
 207     protected static final String VALUE_ARRAY_NULL_GUARD = "(.*call,static  wrapper for: uncommon_trap.*reason='null_check' action='none'.*" + END;
 208     protected static final String STORAGE_PROPERTY_CLEARING = "(.*((int:536870911)|(salq.*3\\R.*sarq.*3)).*" + END;
 209     protected static final String CLASS_CHECK_TRAP = START + "CallStaticJava" + MID + "uncommon_trap.*class_check" + END;
 210 
 211     public static String[] concat(String prefix[], String... extra) {
 212         ArrayList<String> list = new ArrayList<String>();
 213         if (prefix != null) {
 214             for (String s : prefix) {
 215                 list.add(s);
 216             }
 217         }
 218         if (extra != null) {
 219             for (String s : extra) {
 220                 list.add(s);
 221             }
 222         }
 223 
 224         return list.toArray(new String[list.size()]);
 225     }
 226 
 227     /**
 228      * Override getNumScenarios and getVMParameters if you want to run with more than
 229      * the 6 built-in scenarios


 737             } else if (compLevel == COMP_LEVEL_FULL_OPTIMIZATION) {
 738                 compLevel = COMP_LEVEL_SIMPLE;
 739             }
 740         }
 741         if (!TEST_C1 && compLevel < COMP_LEVEL_FULL_OPTIMIZATION) {
 742             compLevel = COMP_LEVEL_FULL_OPTIMIZATION;
 743         }
 744         if (compLevel > (int)TieredStopAtLevel) {
 745             compLevel = (int)TieredStopAtLevel;
 746         }
 747         return compLevel;
 748     }
 749 
 750     public static void enqueueMethodForCompilation(Method m, int level) {
 751         level = restrictCompLevel(level);
 752         if (VERBOSE) {
 753             System.out.println("enqueueMethodForCompilation " + m + ", level = " + level);
 754         }
 755         WHITE_BOX.enqueueMethodForCompilation(m, level);
 756     }
 757 
 758     // Unlike C2, C1 intrinsics never deoptimize System.arraycopy. Instead, we fall back to
 759     // a normal method invocation when encountering flattened arrays.
 760     static boolean isCompiledByC2(Method m) {
 761         return USE_COMPILER && !XCOMP && WHITE_BOX.isMethodCompiled(m, false) &&
 762             WHITE_BOX.getMethodCompilationLevel(m, false) >= COMP_LEVEL_FULL_OPTIMIZATION;
 763     }
 764 }
< prev index next >