comparison src/share/vm/compiler/compileBroker.cpp @ 10206:0cfa93c2fcc4

8012547: Code cache flushing can get stuck reclaming of memory Summary: Keep sweeping regardless of if we are flushing Reviewed-by: kvn, twisti
author neliasso
date Mon, 29 Apr 2013 13:20:19 +0200
parents 7b23cb975cf2
children e4e131b15d5c
comparison
equal deleted inserted replaced
10205:62b683108582 10206:0cfa93c2fcc4
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