7166894: Add gc cause to GC logging for all collectors

Reviewed-by: mgerdin, johnc
This commit is contained in:
Bengt Rutisson 2012-05-15 10:25:06 +02:00
parent b2d4591455
commit eba9965d54
16 changed files with 75 additions and 54 deletions

View file

@ -916,7 +916,7 @@ void ParNewGeneration::collect(bool full,
size_policy->minor_collection_begin();
}
TraceTime t1("GC", PrintGC && !PrintGCDetails, true, gclog_or_tty);
TraceTime t1(GCCauseString("GC", gch->gc_cause()), PrintGC && !PrintGCDetails, true, gclog_or_tty);
// Capture heap used before collection (for printing).
size_t gch_prev_used = gch->used();