src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp

Print this page
rev 3856 : 8004170: G1: Verbose GC output is not getting flushed to log file using JDK 8
Summary: Add flushes to G1CollectedHeap::log_gc_footer() and TraceCPUTime destructor.
Reviewed-by:

*** 3688,3697 **** --- 3688,3698 ---- gclog_or_tty->print("--"); } g1_policy()->print_heap_transition(); gclog_or_tty->print_cr(", %3.7f secs]", pause_time_sec); } + gclog_or_tty->flush(); } bool G1CollectedHeap::do_collection_pause_at_safepoint(double target_pause_time_ms) { assert_at_safepoint(true /* should_be_vm_thread */);
*** 4034,4046 **** #ifdef TRACESPINNING ParallelTaskTerminator::print_termination_counts(); #endif gc_epilogue(false); log_gc_footer(os::elapsedTime() - pause_start_sec); - } // It is not yet to safe to tell the concurrent mark to // start as we have some optional output below. We don't want the // output from the concurrent mark thread interfering with this // logging output either. --- 4035,4048 ---- #ifdef TRACESPINNING ParallelTaskTerminator::print_termination_counts(); #endif gc_epilogue(false); + } + // Print the remainder of the GC log output. log_gc_footer(os::elapsedTime() - pause_start_sec); // It is not yet to safe to tell the concurrent mark to // start as we have some optional output below. We don't want the // output from the concurrent mark thread interfering with this // logging output either.