6935466: new CodeCache flushing code is not guarded by the flag
authorkvn
Tue Mar 16 15:35:33 2010 -0700 (3 years ago)
changeset 1598428a9c451986
parent 15979eba43136cb5
child 1599fc2c71045ada
6935466: new CodeCache flushing code is not guarded by the flag
Summary: Add missing guard.
Reviewed-by: never
src/share/vm/compiler/compileBroker.cpp
--- a/src/share/vm/compiler/compileBroker.cpp Tue Mar 16 11:52:17 2010 +0100
+++ b/src/share/vm/compiler/compileBroker.cpp Tue Mar 16 15:35:33 2010 -0700
@@ -988,10 +988,12 @@ nmethod* CompileBroker::compile_method(m
}
if (method->is_not_compilable(comp_level)) return NULL;
- nmethod* saved = CodeCache::find_and_remove_saved_code(method());
- if (saved != NULL) {
- method->set_code(method, saved);
- return saved;
+ if (UseCodeCacheFlushing) {
+ nmethod* saved = CodeCache::find_and_remove_saved_code(method());
+ if (saved != NULL) {
+ method->set_code(method, saved);
+ return saved;
+ }
}
} else {