diff options
author | johnc <none@none> | 2012-11-30 11:46:17 -0800 |
---|---|---|
committer | johnc <none@none> | 2012-11-30 11:46:17 -0800 |
commit | a6005b78f66e41b72e8dd6bf2a0db75ca714ccc5 (patch) | |
tree | 44ea3d2111ac9ead1487331750642201358227dd /src | |
parent | 10a3ca8122f65d258236b91c14a0c3d0cc26c784 (diff) |
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: jwilhelm, azeemj, brutisso
Diffstat (limited to 'src')
-rw-r--r-- | src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp | 6 | ||||
-rw-r--r-- | src/share/vm/runtime/timer.cpp | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp index 471e638de..70b45fea4 100644 --- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp @@ -3690,6 +3690,7 @@ void G1CollectedHeap::log_gc_footer(double pause_time_sec) { g1_policy()->print_heap_transition(); gclog_or_tty->print_cr(", %3.7f secs]", pause_time_sec); } + gclog_or_tty->flush(); } bool @@ -4036,10 +4037,11 @@ G1CollectedHeap::do_collection_pause_at_safepoint(double target_pause_time_ms) { #endif gc_epilogue(false); - - log_gc_footer(os::elapsedTime() - pause_start_sec); } + // 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 diff --git a/src/share/vm/runtime/timer.cpp b/src/share/vm/runtime/timer.cpp index 640fb50fe..838262650 100644 --- a/src/share/vm/runtime/timer.cpp +++ b/src/share/vm/runtime/timer.cpp @@ -210,8 +210,9 @@ TraceCPUTime::~TraceCPUTime() { } else { _logfile->print("[Error in TraceCPUTime]"); } - if (_print_cr) { + if (_print_cr) { _logfile->print_cr(""); } + _logfile->flush(); } } |