--- a/hotspot/test/compiler/whitebox/CompilerWhiteBoxTest.java Mon Mar 03 08:04:14 2014 +0100
+++ b/hotspot/test/compiler/whitebox/CompilerWhiteBoxTest.java Tue Jan 28 15:05:46 2014 +0100
@@ -196,6 +196,29 @@
}
/**
+ * Checks, that {@linkplain #method} is not compiled at the given compilation
+ * level or above.
+ *
+ * @param compLevel
+ *
+ * @throws RuntimeException if {@linkplain #method} is in compiler queue or
+ * is compiled, or if {@linkplain #method} has zero
+ * compilation level.
+ */
+
+ protected final void checkNotCompiled(int compLevel) {
+ if (WHITE_BOX.isMethodQueuedForCompilation(method)) {
+ throw new RuntimeException(method + " must not be in queue");
+ }
+ if (WHITE_BOX.getMethodCompilationLevel(method, false) >= compLevel) {
+ throw new RuntimeException(method + " comp_level must be >= maxCompLevel");
+ }
+ if (WHITE_BOX.getMethodCompilationLevel(method, true) >= compLevel) {
+ throw new RuntimeException(method + " osr_comp_level must be >= maxCompLevel");
+ }
+ }
+
+ /**
* Checks, that {@linkplain #method} is not compiled.
*
* @throws RuntimeException if {@linkplain #method} is in compiler queue or