8185262: Keep default logging for Metaspace OOM short and concise
Reviewed-by: iklam, coleenp
--- a/hotspot/src/share/vm/memory/metaspace.cpp Wed Jul 26 10:41:07 2017 -0400
+++ b/hotspot/src/share/vm/memory/metaspace.cpp Wed Jul 26 11:47:11 2017 +0200
@@ -3735,10 +3735,13 @@
log.info("Metaspace (%s) allocation failed for size " SIZE_FORMAT,
is_class_space_allocation(mdtype) ? "class" : "data", word_size);
ResourceMark rm;
+ if (log.is_debug()) {
+ if (loader_data->metaspace_or_null() != NULL) {
+ LogStream ls(log.debug());
+ loader_data->dump(&ls);
+ }
+ }
LogStream ls(log.info());
- if (loader_data->metaspace_or_null() != NULL) {
- loader_data->dump(&ls);
- }
MetaspaceAux::dump(&ls);
ChunkManager::print_all_chunkmanagers(&ls);
}