hotspot/src/share/vm/gc/shared/gcTraceTime.cpp
changeset 33107 77bf0d2069a3
parent 33103 116b558af514
child 35061 be6025ebffea
equal deleted inserted replaced
33106:20c533b9e167 33107:77bf0d2069a3
    33 #include "runtime/timer.hpp"
    33 #include "runtime/timer.hpp"
    34 #include "utilities/ostream.hpp"
    34 #include "utilities/ostream.hpp"
    35 #include "utilities/ticks.inline.hpp"
    35 #include "utilities/ticks.inline.hpp"
    36 
    36 
    37 
    37 
    38 GCTraceTimeImpl::GCTraceTimeImpl(const char* title, bool doit, bool print_cr, GCTimer* timer, GCId gc_id) :
    38 GCTraceTimeImpl::GCTraceTimeImpl(const char* title, bool doit, bool print_cr, GCTimer* timer) :
    39     _title(title), _doit(doit), _print_cr(print_cr), _timer(timer), _start_counter() {
    39     _title(title), _doit(doit), _print_cr(print_cr), _timer(timer), _start_counter() {
    40   if (_doit || _timer != NULL) {
    40   if (_doit || _timer != NULL) {
    41     _start_counter.stamp();
    41     _start_counter.stamp();
    42   }
    42   }
    43 
    43 
    47 
    47 
    48     _timer->register_gc_phase_start(title, _start_counter);
    48     _timer->register_gc_phase_start(title, _start_counter);
    49   }
    49   }
    50 
    50 
    51   if (_doit) {
    51   if (_doit) {
    52     gclog_or_tty->date_stamp(PrintGCDateStamps);
    52     gclog_or_tty->gclog_stamp();
    53     gclog_or_tty->stamp(PrintGCTimeStamps);
       
    54     if (PrintGCID) {
       
    55       gclog_or_tty->print("#%u: ", gc_id.id());
       
    56     }
       
    57     gclog_or_tty->print("[%s", title);
    53     gclog_or_tty->print("[%s", title);
    58     gclog_or_tty->flush();
    54     gclog_or_tty->flush();
    59   }
    55   }
    60 }
    56 }
    61 
    57