8215889: assert(!_unloading) failed: This oop is not available to unloading class loader data with ZGC

Reviewed-by: coleenp, neliasso
This commit is contained in:
Erik Österlund 2019-01-10 18:10:15 +01:00
parent 0cd1573f08
commit f08eeac278
8 changed files with 107 additions and 14 deletions

View file

@ -2186,6 +2186,7 @@ void InstanceKlass::clean_method_data() {
for (int m = 0; m < methods()->length(); m++) {
MethodData* mdo = methods()->at(m)->method_data();
if (mdo != NULL) {
MutexLockerEx ml(SafepointSynchronize::is_at_safepoint() ? NULL : mdo->extra_data_lock());
mdo->clean_method_data(/*always_clean*/false);
}
}