< prev index next >

src/share/vm/prims/whitebox.cpp

Print this page

        

@@ -639,11 +639,12 @@
   return result;
 WB_END
 
 bool WhiteBox::compile_method(Method* method, int comp_level, int bci, Thread* THREAD) {
   // Screen for unavailable/bad comp level or null method
-  if (method == NULL || CompileBroker::compiler(comp_level) == NULL) {
+  if (method == NULL || comp_level > TieredStopAtLevel ||
+      CompileBroker::compiler(comp_level) == NULL) {
     return false;
   }
   methodHandle mh(THREAD, method);
   nmethod* nm = CompileBroker::compile_method(mh, bci, comp_level, mh, mh->invocation_count(), "WhiteBox", THREAD);
   MutexLockerEx mu(Compile_lock);
< prev index next >