comparison src/share/vm/gc_interface/collectedHeap.cpp @ 20190:0982ec23da03

8043607: Add a GC id as a log decoration similar to PrintGCTimeStamps Reviewed-by: jwilhelm, ehelin, tschatzl
author brutisso
date Thu, 19 Jun 2014 13:31:14 +0200
parents 78bbf4d43a14
children 7848fc12602b
comparison
equal deleted inserted replaced
20189:5d855d021755 20190:0982ec23da03
556 } 556 }
557 } 557 }
558 558
559 void CollectedHeap::pre_full_gc_dump(GCTimer* timer) { 559 void CollectedHeap::pre_full_gc_dump(GCTimer* timer) {
560 if (HeapDumpBeforeFullGC) { 560 if (HeapDumpBeforeFullGC) {
561 GCTraceTime tt("Heap Dump (before full gc): ", PrintGCDetails, false, timer); 561 GCTraceTime tt("Heap Dump (before full gc): ", PrintGCDetails, false, timer, GCId::create());
562 // We are doing a "major" collection and a heap dump before 562 // We are doing a "major" collection and a heap dump before
563 // major collection has been requested. 563 // major collection has been requested.
564 HeapDumper::dump_heap(); 564 HeapDumper::dump_heap();
565 } 565 }
566 if (PrintClassHistogramBeforeFullGC) { 566 if (PrintClassHistogramBeforeFullGC) {
567 GCTraceTime tt("Class Histogram (before full gc): ", PrintGCDetails, true, timer); 567 GCTraceTime tt("Class Histogram (before full gc): ", PrintGCDetails, true, timer, GCId::create());
568 VM_GC_HeapInspection inspector(gclog_or_tty, false /* ! full gc */); 568 VM_GC_HeapInspection inspector(gclog_or_tty, false /* ! full gc */);
569 inspector.doit(); 569 inspector.doit();
570 } 570 }
571 } 571 }
572 572
573 void CollectedHeap::post_full_gc_dump(GCTimer* timer) { 573 void CollectedHeap::post_full_gc_dump(GCTimer* timer) {
574 if (HeapDumpAfterFullGC) { 574 if (HeapDumpAfterFullGC) {
575 GCTraceTime tt("Heap Dump (after full gc): ", PrintGCDetails, false, timer); 575 GCTraceTime tt("Heap Dump (after full gc): ", PrintGCDetails, false, timer, GCId::create());
576 HeapDumper::dump_heap(); 576 HeapDumper::dump_heap();
577 } 577 }
578 if (PrintClassHistogramAfterFullGC) { 578 if (PrintClassHistogramAfterFullGC) {
579 GCTraceTime tt("Class Histogram (after full gc): ", PrintGCDetails, true, timer); 579 GCTraceTime tt("Class Histogram (after full gc): ", PrintGCDetails, true, timer, GCId::create());
580 VM_GC_HeapInspection inspector(gclog_or_tty, false /* ! full gc */); 580 VM_GC_HeapInspection inspector(gclog_or_tty, false /* ! full gc */);
581 inspector.doit(); 581 inspector.doit();
582 } 582 }
583 } 583 }
584 584