8224531: SEGV while collecting Klass statistics

Reviewed-by: coleenp, kbarrett, tschatzl
This commit is contained in:
Erik Österlund 2019-07-09 16:39:41 +02:00
parent a577b1a972
commit f111dd0cbb
2 changed files with 3 additions and 3 deletions

View File

@ -123,7 +123,7 @@ void KlassInfoEntry::print_on(outputStream* st) const {
KlassInfoEntry* KlassInfoBucket::lookup(Klass* const k) {
// Can happen if k is an archived class that we haven't loaded yet.
if (k->java_mirror() == NULL) {
if (k->java_mirror_no_keepalive() == NULL) {
return NULL;
}
@ -719,7 +719,7 @@ size_t HeapInspection::populate_table(KlassInfoTable* cit, BoolObjectClosure *fi
ResourceMark rm;
RecordInstanceClosure ric(cit, filter);
Universe::heap()->object_iterate(&ric);
Universe::heap()->safe_object_iterate(&ric);
return ric.missed_count();
}

View File

@ -767,7 +767,7 @@ void Klass::oop_print_value_on(oop obj, outputStream* st) {
// Size Statistics
void Klass::collect_statistics(KlassSizeStats *sz) const {
sz->_klass_bytes = sz->count(this);
sz->_mirror_bytes = sz->count(java_mirror());
sz->_mirror_bytes = sz->count(java_mirror_no_keepalive());
sz->_secondary_supers_bytes = sz->count_array(secondary_supers());
sz->_ro_bytes += sz->_secondary_supers_bytes;