Mercurial > hg > truffle
diff 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 |
line wrap: on
line diff
--- a/src/share/vm/compiler/compileBroker.cpp Fri Apr 26 14:41:10 2013 -0700 +++ b/src/share/vm/compiler/compileBroker.cpp Mon Apr 29 13:20:19 2013 +0200 @@ -1229,7 +1229,7 @@ if (method->is_not_compilable(comp_level)) return NULL; if (UseCodeCacheFlushing) { - nmethod* saved = CodeCache::find_and_remove_saved_code(method()); + nmethod* saved = CodeCache::reanimate_saved_code(method()); if (saved != NULL) { method->set_code(method, saved); return saved; @@ -1288,9 +1288,9 @@ method->jmethod_id(); } - // If the compiler is shut off due to code cache flushing or otherwise, + // 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() || (UseCodeCacheFlushing && CodeCache::needs_flushing())) { + if (!should_compile_new_jobs()) { CompilationPolicy::policy()->delay_compilation(method()); return NULL; }