mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8294676: [JVMCI] InstalledCode.deoptimize(false) should not touch address field
Reviewed-by: never
This commit is contained in:
parent
fd594302f7
commit
b8b9b97a1a
7 changed files with 98 additions and 73 deletions
|
@ -1547,14 +1547,18 @@ void JVMCIEnv::invalidate_nmethod_mirror(JVMCIObject mirror, bool deoptimize, JV
|
|||
if (!deoptimize) {
|
||||
// Prevent future executions of the nmethod but let current executions complete.
|
||||
nm->make_not_entrant();
|
||||
} else {
|
||||
// We want the nmethod to be deoptimized immediately.
|
||||
Deoptimization::deoptimize_all_marked(nm);
|
||||
}
|
||||
|
||||
// A HotSpotNmethod instance can only reference a single nmethod
|
||||
// during its lifetime so simply clear it here.
|
||||
set_InstalledCode_address(mirror, 0);
|
||||
// Do not clear the address field here as the Java code may still
|
||||
// want to later call this method with deoptimize == true. That requires
|
||||
// the address field to still be pointing at the nmethod.
|
||||
} else {
|
||||
// Deoptimize the nmethod immediately.
|
||||
Deoptimization::deoptimize_all_marked(nm);
|
||||
|
||||
// A HotSpotNmethod instance can only reference a single nmethod
|
||||
// during its lifetime so simply clear it here.
|
||||
set_InstalledCode_address(mirror, 0);
|
||||
}
|
||||
}
|
||||
|
||||
Klass* JVMCIEnv::asKlass(JVMCIObject obj) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue