Mercurial > hg > truffle
comparison src/share/vm/gc_interface/collectedHeap.cpp @ 3869:7f776886a215
6810861: G1: support -XX:+{PrintClassHistogram,HeapDump}{Before,After}FullGC
Summary: Call {pre,post}_full_gc_dump() before and after a STW full gc of G1CollectedHeap. Also adjusted the prefix message, including the addition of missing whitespace.
Reviewed-by: brutisso, tonyp
author | ysr |
---|---|
date | Mon, 22 Aug 2011 12:30:06 -0700 |
parents | 1d1603768966 |
children | d968f546734e |
comparison
equal
deleted
inserted
replaced
3867:ff53346271fe | 3869:7f776886a215 |
---|---|
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 } |