Print this page
rev 7125 : 7176220: 'Full GC' events miss date stamp information occasionally
Summary: Move date stamp logic into GCTraceTime
Reviewed-by: brutisso, tschatzl

Split Split Close
Expand all
Collapse all
          --- old/hotspot/src/share/vm/gc_implementation/shared/gcTraceTime.cpp
          +++ new/hotspot/src/share/vm/gc_implementation/shared/gcTraceTime.cpp
↓ open down ↓ 41 lines elided ↑ open up ↑
  42   42    }
  43   43  
  44   44    if (_timer != NULL) {
  45   45      assert(SafepointSynchronize::is_at_safepoint(), "Tracing currently only supported at safepoints");
  46   46      assert(Thread::current()->is_VM_thread(), "Tracing currently only supported from the VM thread");
  47   47  
  48   48      _timer->register_gc_phase_start(title, _start_counter);
  49   49    }
  50   50  
  51   51    if (_doit) {
  52      -    if (PrintGCTimeStamps) {
  53      -      gclog_or_tty->stamp();
  54      -      gclog_or_tty->print(": ");
  55      -    }
       52 +    gclog_or_tty->date_stamp(PrintGCDateStamps);
       53 +    gclog_or_tty->stamp(PrintGCTimeStamps);
  56   54      if (PrintGCID) {
  57   55        gclog_or_tty->print("#%u: ", gc_id.id());
  58   56      }
  59   57      gclog_or_tty->print("[%s", title);
  60   58      gclog_or_tty->flush();
  61   59    }
  62   60  }
  63   61  
  64   62  GCTraceTime::~GCTraceTime() {
  65   63    Ticks stop_counter;
↓ open down ↓ 20 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX