6935466: new CodeCache flushing code is not guarded by the flag
Add missing guard. Reviewed-by: never
This commit is contained in:
parent
82e9e2b4af
commit
e8191b6730
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user