8204164: OOM-only logging in Metaspace
authorstuefe
Mon, 04 Jun 2018 07:12:26 +0200
changeset 50372 7a013fbf6fc3
parent 50371 72d0baab31bc
child 50373 22f611c395b3
8204164: OOM-only logging in Metaspace Reviewed-by: gziemski, coleenp
src/hotspot/share/logging/logTag.hpp
src/hotspot/share/memory/metaspace.cpp
--- a/src/hotspot/share/logging/logTag.hpp	Sun Jun 03 14:21:56 2018 -0700
+++ b/src/hotspot/share/logging/logTag.hpp	Mon Jun 04 07:12:26 2018 +0200
@@ -103,6 +103,7 @@
   LOG_TAG(normalize) \
   LOG_TAG(objecttagging) \
   LOG_TAG(obsolete) \
+  LOG_TAG(oom) \
   LOG_TAG(oopmap) \
   LOG_TAG(oopstorage) \
   LOG_TAG(os) \
--- a/src/hotspot/share/memory/metaspace.cpp	Sun Jun 03 14:21:56 2018 -0700
+++ b/src/hotspot/share/memory/metaspace.cpp	Mon Jun 04 07:12:26 2018 +0200
@@ -1270,7 +1270,7 @@
   tracer()->report_metadata_oom(loader_data, word_size, type, mdtype);
 
   // If result is still null, we are out of memory.
-  Log(gc, metaspace, freelist) log;
+  Log(gc, metaspace, freelist, oom) log;
   if (log.is_info()) {
     log.info("Metaspace (%s) allocation failed for size " SIZE_FORMAT,
              is_class_space_allocation(mdtype) ? "class" : "data", word_size);