mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 11:04:34 +02:00
8258380: [JVMCI] don't clear InstalledCode reference when unloading JVMCI nmethods
Reviewed-by: kvn, eosterlund
This commit is contained in:
parent
e7aa5fe602
commit
1f556d22ca
2 changed files with 6 additions and 1 deletions
|
@ -1270,7 +1270,6 @@ void nmethod::make_unloaded() {
|
||||||
JVMCINMethodData* nmethod_data = jvmci_nmethod_data();
|
JVMCINMethodData* nmethod_data = jvmci_nmethod_data();
|
||||||
if (nmethod_data != NULL) {
|
if (nmethod_data != NULL) {
|
||||||
nmethod_data->invalidate_nmethod_mirror(this);
|
nmethod_data->invalidate_nmethod_mirror(this);
|
||||||
nmethod_data->clear_nmethod_mirror(this);
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -714,6 +714,12 @@ void JVMCINMethodData::invalidate_nmethod_mirror(nmethod* nm) {
|
||||||
HotSpotJVMCI::InstalledCode::set_entryPoint(jvmciEnv, nmethod_mirror, 0);
|
HotSpotJVMCI::InstalledCode::set_entryPoint(jvmciEnv, nmethod_mirror, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_nmethod_mirror_index != -1 && nm->is_unloaded()) {
|
||||||
|
// Drop the reference to the nmethod mirror object but don't clear the actual oop reference. Otherwise
|
||||||
|
// it would appear that the nmethod didn't need to be unloaded in the first place.
|
||||||
|
_nmethod_mirror_index = -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
JVMCIRuntime::JVMCIRuntime(int id) {
|
JVMCIRuntime::JVMCIRuntime(int id) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue