402 } |
402 } |
403 } |
403 } |
404 |
404 |
405 void CollectedHeap::pre_full_gc_dump() { |
405 void CollectedHeap::pre_full_gc_dump() { |
406 if (HeapDumpBeforeFullGC) { |
406 if (HeapDumpBeforeFullGC) { |
407 TraceTime tt("Heap Dump: ", PrintGCDetails, false, gclog_or_tty); |
407 TraceTime tt("Heap Dump (before full gc): ", PrintGCDetails, false, gclog_or_tty); |
408 // We are doing a "major" collection and a heap dump before |
408 // We are doing a "major" collection and a heap dump before |
409 // major collection has been requested. |
409 // major collection has been requested. |
410 HeapDumper::dump_heap(); |
410 HeapDumper::dump_heap(); |
411 } |
411 } |
412 if (PrintClassHistogramBeforeFullGC) { |
412 if (PrintClassHistogramBeforeFullGC) { |
413 TraceTime tt("Class Histogram: ", PrintGCDetails, true, gclog_or_tty); |
413 TraceTime tt("Class Histogram (before full gc): ", PrintGCDetails, true, gclog_or_tty); |
414 VM_GC_HeapInspection inspector(gclog_or_tty, false /* ! full gc */, false /* ! prologue */); |
414 VM_GC_HeapInspection inspector(gclog_or_tty, false /* ! full gc */, false /* ! prologue */); |
415 inspector.doit(); |
415 inspector.doit(); |
416 } |
416 } |
417 } |
417 } |
418 |
418 |
419 void CollectedHeap::post_full_gc_dump() { |
419 void CollectedHeap::post_full_gc_dump() { |
420 if (HeapDumpAfterFullGC) { |
420 if (HeapDumpAfterFullGC) { |
421 TraceTime tt("Heap Dump", PrintGCDetails, false, gclog_or_tty); |
421 TraceTime tt("Heap Dump (after full gc): ", PrintGCDetails, false, gclog_or_tty); |
422 HeapDumper::dump_heap(); |
422 HeapDumper::dump_heap(); |
423 } |
423 } |
424 if (PrintClassHistogramAfterFullGC) { |
424 if (PrintClassHistogramAfterFullGC) { |
425 TraceTime tt("Class Histogram", PrintGCDetails, true, gclog_or_tty); |
425 TraceTime tt("Class Histogram (after full gc): ", PrintGCDetails, true, gclog_or_tty); |
426 VM_GC_HeapInspection inspector(gclog_or_tty, false /* ! full gc */, false /* ! prologue */); |
426 VM_GC_HeapInspection inspector(gclog_or_tty, false /* ! full gc */, false /* ! prologue */); |
427 inspector.doit(); |
427 inspector.doit(); |
428 } |
428 } |
429 } |
429 } |