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:

Split Close
Expand all
Collapse all
          --- old/src/share/vm/runtime/timer.cpp
          +++ new/src/share/vm/runtime/timer.cpp
↓ open down ↓ 202 lines elided ↑ open up ↑
 203  203  
 204  204          _logfile->print(" [Times: user=%3.2f sys=%3.2f, real=%3.2f secs] ",
 205  205            user_secs, system_secs, real_secs);
 206  206  
 207  207        } else {
 208  208          _logfile->print("[Invalid result in TraceCPUTime]");
 209  209        }
 210  210      } else {
 211  211        _logfile->print("[Error in TraceCPUTime]");
 212  212      }
 213      -     if (_print_cr) {
      213 +    if (_print_cr) {
 214  214        _logfile->print_cr("");
 215  215      }
      216 +    _logfile->flush();
 216  217    }
 217  218  }
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX