hotspot/src/share/vm/gc/shared/collectedHeap.cpp
changeset 35939 05df7e64ecfc
parent 35915 5808cd93abfc
child 36363 394562fd49a3
--- a/hotspot/src/share/vm/gc/shared/collectedHeap.cpp	Thu Feb 04 23:39:27 2016 +0000
+++ b/hotspot/src/share/vm/gc/shared/collectedHeap.cpp	Fri Feb 05 08:59:36 2016 +0100
@@ -572,19 +572,16 @@
 }
 
 void CollectedHeap::full_gc_dump(GCTimer* timer, bool before) {
+  assert(timer != NULL, "timer is null");
   if ((HeapDumpBeforeFullGC && before) || (HeapDumpAfterFullGC && !before)) {
-    GCIdMarkAndRestore gc_id_mark;
-    FormatBuffer<> title("Heap Dump (%s full gc)", before ? "before" : "after");
-    GCTraceTime(Info, gc) tm(title.buffer(), timer);
+    GCTraceTime(Info, gc) tm(before ? "Heap Dump (before full gc)" : "Heap Dump (after full gc)", timer);
     HeapDumper::dump_heap();
   }
+
   LogHandle(gc, classhisto) log;
   if (log.is_trace()) {
+    GCTraceTime(Trace, gc, classhisto) tm(before ? "Class Histogram (before full gc)" : "Class Histogram (after full gc)", timer);
     ResourceMark rm;
-    GCIdMarkAndRestore gc_id_mark;
-    FormatBuffer<> title("Class Histogram (%s full gc)",
-                         before ? "before" : "after");
-    GCTraceTime(Trace, gc, classhisto) tm(title.buffer(), timer);
     VM_GC_HeapInspection inspector(log.trace_stream(), false /* ! full gc */);
     inspector.doit();
   }