--- old/src/share/vm/compiler/compileBroker.cpp 2013-10-03 15:02:19.673367728 +0200 +++ new/src/share/vm/compiler/compileBroker.cpp 2013-10-03 15:02:19.621367729 +0200 @@ -1299,13 +1299,6 @@ method->jmethod_id(); } - // If the compiler is shut off due to code cache getting full - // fail out now so blocking compiles dont hang the java thread - if (!should_compile_new_jobs()) { - CompilationPolicy::policy()->delay_compilation(method()); - return NULL; - } - // do the compilation if (method->is_native()) { if (!PreferInterpreterNativeStubs || method->is_method_handle_intrinsic()) { @@ -1320,6 +1313,13 @@ return NULL; } } else { + // If the compiler is shut off due to code cache getting full + // fail out now so blocking compiles dont hang the java thread + if (!should_compile_new_jobs()) { + CompilationPolicy::policy()->delay_compilation(method()); + return NULL; + } + compile_method_base(method, osr_bci, comp_level, hot_method, hot_count, comment, THREAD); }