changeset 13387:136f607c4bba

8185262: Keep default logging for Metaspace OOM short and concise Reviewed-by: iklam, coleenp
author stuefe
date Wed, 26 Jul 2017 11:47:11 +0200
parents 58902da25a31
children 1cd12dd1d032
files src/share/vm/memory/metaspace.cpp
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/memory/metaspace.cpp	Wed Jul 26 10:41:07 2017 -0400
+++ b/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);
   }