8202447: Fix unloading_occurred to mean unloading_occurred

Nmethod unloading does not need to test for jvmti to set unloading_occurred, nor do we need to clean weak Klasses in metadata if unloading does not occur.

Reviewed-by: sspitsyn, rehn
This commit is contained in:
Coleen Phillimore 2018-04-27 15:00:04 -04:00
parent 9353d59547
commit 204ba9a580
11 changed files with 32 additions and 53 deletions

View file

@ -429,7 +429,7 @@ void VirtualCallData::clean_weak_method_links() {
ReceiverTypeData::clean_weak_method_links();
for (uint row = 0; row < method_row_limit(); row++) {
Method* p = method(row);
if (p != NULL && !p->on_stack()) {
if (p != NULL && p->is_old()) {
clear_method_row(row);
}
}
@ -1770,6 +1770,8 @@ void MethodData::clean_method_data(bool always_clean) {
verify_extra_data_clean(&cl);
}
// This is called during redefinition to clean all "old" redefined
// methods out of MethodData for all methods.
void MethodData::clean_weak_method_links() {
ResourceMark rm;
for (ProfileData* data = first_data();