8043607: Add a GC id as a log decoration similar to PrintGCTimeStamps

Reviewed-by: jwilhelm, ehelin, tschatzl
This commit is contained in:
Bengt Rutisson 2014-06-19 13:31:14 +02:00
parent ad2e593b80
commit 9672a26d51
32 changed files with 404 additions and 174 deletions

View file

@ -24,6 +24,7 @@
#include "precompiled.hpp"
#include "gc_implementation/shared/gcTimer.hpp"
#include "gc_implementation/shared/gcTrace.hpp"
#include "gc_implementation/shared/gcTraceTime.hpp"
#include "runtime/globals.hpp"
#include "runtime/os.hpp"
@ -34,7 +35,7 @@
#include "utilities/ticks.inline.hpp"
GCTraceTime::GCTraceTime(const char* title, bool doit, bool print_cr, GCTimer* timer) :
GCTraceTime::GCTraceTime(const char* title, bool doit, bool print_cr, GCTimer* timer, GCId gc_id) :
_title(title), _doit(doit), _print_cr(print_cr), _timer(timer), _start_counter() {
if (_doit || _timer != NULL) {
_start_counter.stamp();
@ -52,6 +53,9 @@ GCTraceTime::GCTraceTime(const char* title, bool doit, bool print_cr, GCTimer* t
gclog_or_tty->stamp();
gclog_or_tty->print(": ");
}
if (PrintGCID) {
gclog_or_tty->print("#%u: ", gc_id.id());
}
gclog_or_tty->print("[%s", title);
gclog_or_tty->flush();
}