6935466: new CodeCache flushing code is not guarded by the flag

Add missing guard.

Reviewed-by: never
This commit is contained in:
Vladimir Kozlov 2010-03-16 15:35:33 -07:00
parent 82e9e2b4af
commit e8191b6730

View File

@ -988,10 +988,12 @@ nmethod* CompileBroker::compile_method(methodHandle method, int osr_bci,
}
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 {