< prev index next >
src/hotspot/share/memory/metaspace.cpp
Print this page
rev 49895 : [mq]: 8201572-improve-metaspace-reporting
rev 49896 : [mq]: 8201572-improve-metaspace-reporting-delta
@@ -177,10 +177,11 @@
switch (t) {
case Metaspace::StandardMetaspaceType: s = "Standard"; break;
case Metaspace::BootMetaspaceType: s = "Boot"; break;
case Metaspace::AnonymousMetaspaceType: s = "Anonymous"; break;
case Metaspace::ReflectionMetaspaceType: s = "Reflection"; break;
+ default: ShouldNotReachHere();
}
assert(s != NULL, "Invalid space type");
return s;
}
@@ -1701,10 +1702,11 @@
if (lt.is_enabled()) {
LogStream ls(lt);
ls.print("VirtualSpaceNode::take_from_committed() not available " SIZE_FORMAT " words ", chunk_word_size);
// Dump some information about the virtual space that is nearly full
print_on(&ls);
+ ls.cr(); // ~LogStream does not autoflush.
}
return NULL;
}
// Take the space (bump top on the current virtual space).
@@ -2216,10 +2218,11 @@
if (lt.is_enabled()) {
LogStream ls(lt);
VirtualSpaceNode* vsl = current_virtual_space();
ResourceMark rm;
vsl->print_on(&ls);
+ ls.cr(); // ~LogStream does not autoflush.
}
}
bool VirtualSpaceList::expand_node_by(VirtualSpaceNode* node,
size_t min_words,
@@ -3035,10 +3038,11 @@
LogStream ls(lt);
ls.print("ChunkManager::chunk_freelist_allocate: " PTR_FORMAT " chunk " PTR_FORMAT " size " SIZE_FORMAT " count " SIZE_FORMAT " ",
p2i(this), p2i(chunk), chunk->word_size(), list_count);
ResourceMark rm;
locked_print_free_chunks(&ls);
+ ls.cr(); // ~LogStream does not autoflush.
}
return chunk;
}
@@ -3411,10 +3415,11 @@
LogStream ls(log.trace());
locked_print_chunks_in_use_on(&ls);
if (block_freelists() != NULL) {
block_freelists()->print_on(&ls);
}
+ ls.cr(); // ~LogStream does not autoflush.
}
// Add all the chunks in use by this space manager
// to the global list of free chunks.
@@ -3479,10 +3484,11 @@
log.trace("SpaceManager::added chunk: ");
ResourceMark rm;
LogStream ls(log.trace());
new_chunk->print_on(&ls);
chunk_manager()->locked_print_free_chunks(&ls);
+ ls.cr(); // ~LogStream does not autoflush.
}
}
void SpaceManager::retire_current_chunk() {
if (current_chunk() != NULL) {
@@ -4414,10 +4420,11 @@
LogTarget(Trace, gc, metaspace) lt;
if (lt.is_enabled()) {
ResourceMark rm;
LogStream ls(lt);
print_compressed_class_space(&ls, requested_addr);
+ ls.cr(); // ~LogStream does not autoflush.
}
}
void Metaspace::print_compressed_class_space(outputStream* st, const char* requested_addr) {
st->print_cr("Narrow klass base: " PTR_FORMAT ", Narrow klass shift: %d",
@@ -4635,15 +4642,17 @@
ResourceMark rm;
if (log.is_debug()) {
if (loader_data->metaspace_or_null() != NULL) {
LogStream ls(log.debug());
loader_data->print_value_on(&ls);
+ ls.cr(); // ~LogStream does not autoflush.
}
}
LogStream ls(log.info());
// In case of an OOM, log out a short but still useful report.
MetaspaceUtils::print_basic_report(&ls, 0);
+ ls.cr(); // ~LogStream does not autoflush.
}
bool out_of_compressed_class_space = false;
if (is_class_space_allocation(mdtype)) {
ClassLoaderMetaspace* metaspace = loader_data->metaspace_non_null();
< prev index next >