--- a/hotspot/src/share/vm/gc/shared/collectedHeap.cpp Thu Oct 08 22:35:20 2015 +0200
+++ b/hotspot/src/share/vm/gc/shared/collectedHeap.cpp Thu Oct 08 12:44:12 2015 +0200
@@ -573,12 +573,14 @@
void CollectedHeap::pre_full_gc_dump(GCTimer* timer) {
if (HeapDumpBeforeFullGC) {
+ GCIdMarkAndRestore gc_id_mark;
GCTraceTime tt("Heap Dump (before full gc): ", PrintGCDetails, false, timer);
// We are doing a full collection and a heap dump before
// full collection has been requested.
HeapDumper::dump_heap();
}
if (PrintClassHistogramBeforeFullGC) {
+ GCIdMarkAndRestore gc_id_mark;
GCTraceTime tt("Class Histogram (before full gc): ", PrintGCDetails, true, timer);
VM_GC_HeapInspection inspector(gclog_or_tty, false /* ! full gc */);
inspector.doit();
@@ -587,10 +589,12 @@
void CollectedHeap::post_full_gc_dump(GCTimer* timer) {
if (HeapDumpAfterFullGC) {
+ GCIdMarkAndRestore gc_id_mark;
GCTraceTime tt("Heap Dump (after full gc): ", PrintGCDetails, false, timer);
HeapDumper::dump_heap();
}
if (PrintClassHistogramAfterFullGC) {
+ GCIdMarkAndRestore gc_id_mark;
GCTraceTime tt("Class Histogram (after full gc): ", PrintGCDetails, true, timer);
VM_GC_HeapInspection inspector(gclog_or_tty, false /* ! full gc */);
inspector.doit();