comparison src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp @ 6064:9d679effd28c

7166894: Add gc cause to GC logging for all collectors Reviewed-by: mgerdin, johnc
author brutisso
date Tue, 15 May 2012 10:25:06 +0200
parents ab4422d0ed59
children da91efe96a93
comparison
equal deleted inserted replaced
6063:cdfa5139bd58 6064:9d679effd28c
158 bool survivors_empty; 158 bool survivors_empty;
159 bool young_gen_empty; 159 bool young_gen_empty;
160 160
161 { 161 {
162 HandleMark hm; 162 HandleMark hm;
163 const bool is_system_gc = gc_cause == GCCause::_java_lang_system_gc; 163
164 // This is useful for debugging but don't change the output the
165 // the customer sees.
166 const char* gc_cause_str = "Full GC";
167 if (is_system_gc && PrintGCDetails) {
168 gc_cause_str = "Full GC (System)";
169 }
170 gclog_or_tty->date_stamp(PrintGC && PrintGCDateStamps); 164 gclog_or_tty->date_stamp(PrintGC && PrintGCDateStamps);
171 TraceCPUTime tcpu(PrintGCDetails, true, gclog_or_tty); 165 TraceCPUTime tcpu(PrintGCDetails, true, gclog_or_tty);
172 TraceTime t1(gc_cause_str, PrintGC, !PrintGCDetails, gclog_or_tty); 166 TraceTime t1(GCCauseString("Full GC", gc_cause), PrintGC, !PrintGCDetails, gclog_or_tty);
173 TraceCollectorStats tcs(counters()); 167 TraceCollectorStats tcs(counters());
174 TraceMemoryManagerStats tms(true /* Full GC */,gc_cause); 168 TraceMemoryManagerStats tms(true /* Full GC */,gc_cause);
175 169
176 if (TraceGen1Time) accumulated_time()->start(); 170 if (TraceGen1Time) accumulated_time()->start();
177 171