38 */
39 public class NonTieredLevelsTest extends CompLevelsTest {
40 private static final int AVAILABLE_COMP_LEVEL;
41 private static final IntPredicate IS_AVAILABLE_COMPLEVEL;
42 static {
43 String vmName = System.getProperty("java.vm.name");
44 if (vmName.endsWith(" Server VM")) {
45 AVAILABLE_COMP_LEVEL = COMP_LEVEL_FULL_OPTIMIZATION;
46 IS_AVAILABLE_COMPLEVEL = x -> x == COMP_LEVEL_FULL_OPTIMIZATION;
47 } else if (vmName.endsWith(" Client VM")
48 || vmName.endsWith(" Minimal VM")) {
49 AVAILABLE_COMP_LEVEL = COMP_LEVEL_SIMPLE;
50 IS_AVAILABLE_COMPLEVEL = x -> x >= COMP_LEVEL_SIMPLE
51 && x <= COMP_LEVEL_FULL_PROFILE;
52 } else {
53 throw new RuntimeException("Unknown VM: " + vmName);
54 }
55
56 }
57 public static void main(String[] args) throws Exception {
58 if (TIERED_COMPILATION) {
59 System.err.println("Test isn't applicable w/ enabled "
60 + "TieredCompilation. Skip test.");
61 return;
62 }
63 CompilerWhiteBoxTest.main(NonTieredLevelsTest::new, args);
64 }
65
66 private NonTieredLevelsTest(TestCase testCase) {
67 super(testCase);
68 // to prevent inlining of #method
69 WHITE_BOX.testSetDontInlineMethod(method, true);
70 }
71
72 @Override
73 protected void test() throws Exception {
74 if (skipXcompOSR()) {
75 return;
76 }
77 checkNotCompiled();
78 compile();
79 checkCompiled();
80
|
38 */
39 public class NonTieredLevelsTest extends CompLevelsTest {
40 private static final int AVAILABLE_COMP_LEVEL;
41 private static final IntPredicate IS_AVAILABLE_COMPLEVEL;
42 static {
43 String vmName = System.getProperty("java.vm.name");
44 if (vmName.endsWith(" Server VM")) {
45 AVAILABLE_COMP_LEVEL = COMP_LEVEL_FULL_OPTIMIZATION;
46 IS_AVAILABLE_COMPLEVEL = x -> x == COMP_LEVEL_FULL_OPTIMIZATION;
47 } else if (vmName.endsWith(" Client VM")
48 || vmName.endsWith(" Minimal VM")) {
49 AVAILABLE_COMP_LEVEL = COMP_LEVEL_SIMPLE;
50 IS_AVAILABLE_COMPLEVEL = x -> x >= COMP_LEVEL_SIMPLE
51 && x <= COMP_LEVEL_FULL_PROFILE;
52 } else {
53 throw new RuntimeException("Unknown VM: " + vmName);
54 }
55
56 }
57 public static void main(String[] args) throws Exception {
58 if (CompilerWhiteBoxTest.skipOnTieredCompilation(true)) {
59 return;
60 }
61 CompilerWhiteBoxTest.main(NonTieredLevelsTest::new, args);
62 }
63
64 private NonTieredLevelsTest(TestCase testCase) {
65 super(testCase);
66 // to prevent inlining of #method
67 WHITE_BOX.testSetDontInlineMethod(method, true);
68 }
69
70 @Override
71 protected void test() throws Exception {
72 if (skipXcompOSR()) {
73 return;
74 }
75 checkNotCompiled();
76 compile();
77 checkCompiled();
78
|