8152639: ResourceMark missing in reportFreeListStatistics
authorstefank
Mon, 11 Apr 2016 08:51:53 +0200
changeset 37457 79f4b6032f9e
parent 37456 bf26e0f4235f
child 37458 5a20a686b58d
8152639: ResourceMark missing in reportFreeListStatistics Reviewed-by: pliden, sjohanss
hotspot/src/share/vm/gc/cms/compactibleFreeListSpace.cpp
--- a/hotspot/src/share/vm/gc/cms/compactibleFreeListSpace.cpp	Mon Apr 11 08:51:53 2016 +0200
+++ b/hotspot/src/share/vm/gc/cms/compactibleFreeListSpace.cpp	Mon Apr 11 08:51:53 2016 +0200
@@ -32,6 +32,7 @@
 #include "gc/shared/genCollectedHeap.hpp"
 #include "gc/shared/space.inline.hpp"
 #include "gc/shared/spaceDecorator.hpp"
+#include "logging/logStream.inline.hpp"
 #include "memory/allocation.inline.hpp"
 #include "memory/resourceArea.hpp"
 #include "memory/universe.inline.hpp"
@@ -505,10 +506,13 @@
     return;
   }
   log.debug("%s", title);
-  _dictionary->report_statistics(log.debug_stream());
+
+  LogStream out(log.debug());
+  _dictionary->report_statistics(&out);
+
   if (log.is_trace()) {
-    ResourceMark rm;
-    reportIndexedFreeListStatistics(log.trace_stream());
+    LogStream trace_out(log.trace());
+    reportIndexedFreeListStatistics(&trace_out);
     size_t total_size = totalSizeInIndexedFreeLists() +
                        _dictionary->total_chunk_size(DEBUG_ONLY(freelistLock()));
     log.trace(" free=" SIZE_FORMAT " frag=%1.4f", total_size, flsFrag());