8268478: JVMCI tests failing after JDK-8268052

Reviewed-by: kvn, eosterlund
This commit is contained in:
Tom Rodriguez 2021-06-09 23:04:45 +00:00
parent 7ff6e7b2b1
commit b41f3f8ed5

View File

@ -1805,6 +1805,7 @@ JVMCI::CodeInstallResult JVMCIRuntime::register_method(JVMCIEnv* JVMCIENV,
}
} else {
assert(!nmethod_mirror.is_hotspot() || data->get_nmethod_mirror(nm, /* phantom_ref */ false) == HotSpotJVMCI::resolve(nmethod_mirror), "must be");
MutexLocker ml(CompiledMethod_lock, Mutex::_no_safepoint_check_flag);
if (!nm->make_in_use()) {
result = JVMCI::nmethod_reclaimed;
}