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

@ -6332,10 +6332,10 @@ void CMSCollector::reset(bool asynch) {
)
}
void CMSCollector::do_CMS_operation(CMS_op_type op) {
void CMSCollector::do_CMS_operation(CMS_op_type op, GCCause::Cause gc_cause) {
gclog_or_tty->date_stamp(PrintGC && PrintGCDateStamps);
TraceCPUTime tcpu(PrintGCDetails, true, gclog_or_tty);
TraceTime t("GC", PrintGC, !PrintGCDetails, gclog_or_tty);
TraceTime t(GCCauseString("GC", gc_cause), PrintGC, !PrintGCDetails, gclog_or_tty);
TraceCollectorStats tcs(counters());
switch (op) {