8333290: NMT report should not print Metaspace info if Metaspace is not yet initialized
Reviewed-by: stefank, dholmes
This commit is contained in:
parent
c0ce7d871f
commit
d29d5bfb7f
@ -45,6 +45,7 @@ size_t RunningCounters::reserved_words_class() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
size_t RunningCounters::reserved_words_nonclass() {
|
size_t RunningCounters::reserved_words_nonclass() {
|
||||||
|
assert(VirtualSpaceList::vslist_nonclass() != nullptr, "Metaspace not yet initialized");
|
||||||
return VirtualSpaceList::vslist_nonclass()->reserved_words();
|
return VirtualSpaceList::vslist_nonclass()->reserved_words();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,6 +60,7 @@ size_t RunningCounters::committed_words_class() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
size_t RunningCounters::committed_words_nonclass() {
|
size_t RunningCounters::committed_words_nonclass() {
|
||||||
|
assert(VirtualSpaceList::vslist_nonclass() != nullptr, "Metaspace not yet initialized");
|
||||||
return VirtualSpaceList::vslist_nonclass()->committed_words();
|
return VirtualSpaceList::vslist_nonclass()->committed_words();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -90,6 +92,7 @@ size_t RunningCounters::free_chunks_words_class() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
size_t RunningCounters::free_chunks_words_nonclass() {
|
size_t RunningCounters::free_chunks_words_nonclass() {
|
||||||
|
assert(ChunkManager::chunkmanager_nonclass() != nullptr, "Metaspace not yet initialized");
|
||||||
return ChunkManager::chunkmanager_nonclass()->total_word_size();
|
return ChunkManager::chunkmanager_nonclass()->total_word_size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -272,6 +272,13 @@ void MemSummaryReporter::report_summary_of_type(MEMFLAGS flag,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void MemSummaryReporter::report_metadata(Metaspace::MetadataType type) const {
|
void MemSummaryReporter::report_metadata(Metaspace::MetadataType type) const {
|
||||||
|
|
||||||
|
// NMT reports may be triggered (as part of error handling) very early. Make sure
|
||||||
|
// Metaspace is already initialized.
|
||||||
|
if (!Metaspace::initialized()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
assert(type == Metaspace::NonClassType || type == Metaspace::ClassType,
|
assert(type == Metaspace::NonClassType || type == Metaspace::ClassType,
|
||||||
"Invalid metadata type");
|
"Invalid metadata type");
|
||||||
const char* name = (type == Metaspace::NonClassType) ?
|
const char* name = (type == Metaspace::NonClassType) ?
|
||||||
|
Loading…
Reference in New Issue
Block a user