7198130: G1: PrintReferenceGC output comes out of order

Move the first part of the GC logging, including timestamp, to the start of the GC

Reviewed-by: johnc, jwilhelm
This commit is contained in:
Bengt Rutisson 2012-09-17 10:33:13 +02:00
parent 9a271f468a
commit a08d48f9b1
4 changed files with 45 additions and 46 deletions

View file

@ -120,10 +120,7 @@ TraceTime::TraceTime(const char* title,
if (_active) {
_accum = NULL;
if (PrintGCTimeStamps) {
_logfile->stamp();
_logfile->print(": ");
}
_logfile->stamp(PrintGCTimeStamps);
_logfile->print("[%s", title);
_logfile->flush();
_t.start();
@ -141,10 +138,7 @@ TraceTime::TraceTime(const char* title,
_logfile = (logfile != NULL) ? logfile : tty;
if (_active) {
if (_verbose) {
if (PrintGCTimeStamps) {
_logfile->stamp();
_logfile->print(": ");
}
_logfile->stamp(PrintGCTimeStamps);
_logfile->print("[%s", title);
_logfile->flush();
}