changeset 5361:303826f477c6

8023452: TestCase$Helper(java.lang.Object) must be osr_compiled Reviewed-by: kvn
author iignatyev
date Sat, 28 Sep 2013 12:32:10 +0400
parents e8e077292da3
children f2512d89ad0c
files test/compiler/whitebox/CompilerWhiteBoxTest.java test/compiler/whitebox/DeoptimizeAllTest.java test/compiler/whitebox/DeoptimizeMethodTest.java test/compiler/whitebox/EnqueueMethodForCompilationTest.java test/compiler/whitebox/IsMethodCompilableTest.java test/compiler/whitebox/MakeMethodNotCompilableTest.java
diffstat 6 files changed, 30 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/test/compiler/whitebox/CompilerWhiteBoxTest.java	Sat Sep 28 12:32:09 2013 +0400
+++ b/test/compiler/whitebox/CompilerWhiteBoxTest.java	Sat Sep 28 12:32:10 2013 +0400
@@ -74,6 +74,9 @@
     protected static final int THRESHOLD;
     /** count of invocation to triger OSR compilation */
     protected static final long BACKEDGE_THRESHOLD;
+    /** Value of {@code java.vm.info} (interpreted|mixed|comp mode) */
+    protected static final String MODE
+            = System.getProperty("java.vm.info");
 
     static {
         if (TIERED_COMPILATION) {
@@ -202,7 +205,7 @@
         if (WHITE_BOX.getMethodCompilationLevel(method, true) != 0) {
             throw new RuntimeException(method + " osr_comp_level must be == 0");
         }
-    }
+   }
 
     /**
      * Checks, that {@linkplain #method} is compiled.
--- a/test/compiler/whitebox/DeoptimizeAllTest.java	Sat Sep 28 12:32:09 2013 +0400
+++ b/test/compiler/whitebox/DeoptimizeAllTest.java	Sat Sep 28 12:32:10 2013 +0400
@@ -53,6 +53,12 @@
      */
     @Override
     protected void test() throws Exception {
+        if (testCase.isOsr && CompilerWhiteBoxTest.MODE.startsWith(
+                "compiled ")) {
+          System.err.printf("Warning: %s is not applicable in %s%n",
+                testCase.name(), CompilerWhiteBoxTest.MODE);
+          return;
+        }
         compile();
         checkCompiled();
         WHITE_BOX.deoptimizeAll();
--- a/test/compiler/whitebox/DeoptimizeMethodTest.java	Sat Sep 28 12:32:09 2013 +0400
+++ b/test/compiler/whitebox/DeoptimizeMethodTest.java	Sat Sep 28 12:32:10 2013 +0400
@@ -53,6 +53,12 @@
      */
     @Override
     protected void test() throws Exception {
+        if (testCase.isOsr && CompilerWhiteBoxTest.MODE.startsWith(
+                "compiled ")) {
+          System.err.printf("Warning: %s is not applicable in %s%n",
+                testCase.name(), CompilerWhiteBoxTest.MODE);
+          return;
+        }
         compile();
         checkCompiled();
         deoptimize();
--- a/test/compiler/whitebox/EnqueueMethodForCompilationTest.java	Sat Sep 28 12:32:09 2013 +0400
+++ b/test/compiler/whitebox/EnqueueMethodForCompilationTest.java	Sat Sep 28 12:32:10 2013 +0400
@@ -70,12 +70,10 @@
 
         int compLevel = getCompLevel();
         int bci = WHITE_BOX.getMethodEntryBci(method);
-        System.out.println("bci = " + bci);
-        printInfo();
         deoptimize();
-        printInfo();
         checkNotCompiled();
-        printInfo();
+        WHITE_BOX.clearMethodState(method);
+
         WHITE_BOX.enqueueMethodForCompilation(method, compLevel, bci);
         checkCompiled();
         deoptimize();
--- a/test/compiler/whitebox/IsMethodCompilableTest.java	Sat Sep 28 12:32:09 2013 +0400
+++ b/test/compiler/whitebox/IsMethodCompilableTest.java	Sat Sep 28 12:32:10 2013 +0400
@@ -68,6 +68,12 @@
      */
     @Override
     protected void test() throws Exception {
+        if (testCase.isOsr && CompilerWhiteBoxTest.MODE.startsWith(
+                "compiled ")) {
+          System.err.printf("Warning: %s is not applicable in %s%n",
+                testCase.name(), CompilerWhiteBoxTest.MODE);
+          return;
+        }
         if (!isCompilable()) {
             throw new RuntimeException(method + " must be compilable");
         }
--- a/test/compiler/whitebox/MakeMethodNotCompilableTest.java	Sat Sep 28 12:32:09 2013 +0400
+++ b/test/compiler/whitebox/MakeMethodNotCompilableTest.java	Sat Sep 28 12:32:10 2013 +0400
@@ -62,6 +62,12 @@
      */
     @Override
     protected void test() throws Exception {
+        if (testCase.isOsr && CompilerWhiteBoxTest.MODE.startsWith(
+                "compiled ")) {
+          System.err.printf("Warning: %s is not applicable in %s%n",
+                testCase.name(), CompilerWhiteBoxTest.MODE);
+          return;
+        }
         checkNotCompiled();
         if (!isCompilable()) {
             throw new RuntimeException(method + " must be compilable");