6797870: Add -XX:+{HeapDump,PrintClassHistogram}{Before,After}FullGC

Call newly created CollectedHeap::dump_{pre,post}_full_gc before and after every stop-world full collection cycle on GenCollectedHeap and ParallelScavengeHeap. (Support for G1CollectedHeap forthcoming under CR 6810861.) Small modifications to existing heap dumping and class histogram implementation, especially to allow multiple on-the-fly histos/dumps by the VM thread during a single safepoint.

Reviewed-by: jmasa, alanb, mchung
This commit is contained in:
Y. Srinivas Ramakrishna 2009-03-02 16:37:04 -08:00
parent dd4aaeadd4
commit 72bfacbd95
15 changed files with 170 additions and 62 deletions

View file

@ -1982,6 +1982,8 @@ void PSParallelCompact::invoke_no_policy(bool maximum_heap_compaction) {
heap->record_gen_tops_before_GC();
}
heap->pre_full_gc_dump();
_print_phases = PrintGCDetails && PrintParallelOldGCPhaseTimes;
// Make sure data structures are sane, make the heap parsable, and do other
@ -2204,6 +2206,8 @@ void PSParallelCompact::invoke_no_policy(bool maximum_heap_compaction) {
gc_task_manager()->print_task_time_stamps();
}
heap->post_full_gc_dump();
#ifdef TRACESPINNING
ParallelTaskTerminator::print_termination_counts();
#endif