mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8221456: nmethod::make_unloaded() clears _method member too early
Reviewed-by: eosterlund, thartmann
This commit is contained in:
parent
ea59f49e55
commit
9f2ac63e67
1 changed files with 3 additions and 1 deletions
|
@ -1089,7 +1089,6 @@ void nmethod::make_unloaded() {
|
||||||
if (_method->code() == this) {
|
if (_method->code() == this) {
|
||||||
_method->clear_code(); // Break a cycle
|
_method->clear_code(); // Break a cycle
|
||||||
}
|
}
|
||||||
_method = NULL; // Clear the method of this dead nmethod
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make the class unloaded - i.e., change state and notify sweeper
|
// Make the class unloaded - i.e., change state and notify sweeper
|
||||||
|
@ -1109,6 +1108,9 @@ void nmethod::make_unloaded() {
|
||||||
Universe::heap()->unregister_nmethod(this);
|
Universe::heap()->unregister_nmethod(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Clear the method of this dead nmethod
|
||||||
|
set_method(NULL);
|
||||||
|
|
||||||
// Log the unloading.
|
// Log the unloading.
|
||||||
log_state_change();
|
log_state_change();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue