mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-25 22:04:51 +02:00
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
1 changed files with 6 additions and 4 deletions
|
@ -988,10 +988,12 @@ nmethod* CompileBroker::compile_method(methodHandle method, int osr_bci,
|
||||||
}
|
}
|
||||||
if (method->is_not_compilable(comp_level)) return NULL;
|
if (method->is_not_compilable(comp_level)) return NULL;
|
||||||
|
|
||||||
nmethod* saved = CodeCache::find_and_remove_saved_code(method());
|
if (UseCodeCacheFlushing) {
|
||||||
if (saved != NULL) {
|
nmethod* saved = CodeCache::find_and_remove_saved_code(method());
|
||||||
method->set_code(method, saved);
|
if (saved != NULL) {
|
||||||
return saved;
|
method->set_code(method, saved);
|
||||||
|
return saved;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue