1227 } |
1227 } |
1228 } |
1228 } |
1229 if (method->is_not_compilable(comp_level)) return NULL; |
1229 if (method->is_not_compilable(comp_level)) return NULL; |
1230 |
1230 |
1231 if (UseCodeCacheFlushing) { |
1231 if (UseCodeCacheFlushing) { |
1232 nmethod* saved = CodeCache::find_and_remove_saved_code(method()); |
1232 nmethod* saved = CodeCache::reanimate_saved_code(method()); |
1233 if (saved != NULL) { |
1233 if (saved != NULL) { |
1234 method->set_code(method, saved); |
1234 method->set_code(method, saved); |
1235 return saved; |
1235 return saved; |
1236 } |
1236 } |
1237 } |
1237 } |
1286 // a lock the compiling thread can not acquire. Prefetch it here. |
1286 // a lock the compiling thread can not acquire. Prefetch it here. |
1287 if (JvmtiExport::should_post_compiled_method_load()) { |
1287 if (JvmtiExport::should_post_compiled_method_load()) { |
1288 method->jmethod_id(); |
1288 method->jmethod_id(); |
1289 } |
1289 } |
1290 |
1290 |
1291 // If the compiler is shut off due to code cache flushing or otherwise, |
1291 // If the compiler is shut off due to code cache getting full |
1292 // fail out now so blocking compiles dont hang the java thread |
1292 // fail out now so blocking compiles dont hang the java thread |
1293 if (!should_compile_new_jobs() || (UseCodeCacheFlushing && CodeCache::needs_flushing())) { |
1293 if (!should_compile_new_jobs()) { |
1294 CompilationPolicy::policy()->delay_compilation(method()); |
1294 CompilationPolicy::policy()->delay_compilation(method()); |
1295 return NULL; |
1295 return NULL; |
1296 } |
1296 } |
1297 |
1297 |
1298 // do the compilation |
1298 // do the compilation |