diff src/share/vm/gc_implementation/g1/g1CollectorPolicy.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 3a22b77e755a
children bbc900c2482a
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp	Tue May 15 22:26:37 2012 +0200
+++ b/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp	Tue May 15 10:25:06 2012 +0200
@@ -886,9 +886,8 @@
                                                       size_t start_used) {
   if (G1Log::finer()) {
     gclog_or_tty->stamp(PrintGCTimeStamps);
-    gclog_or_tty->print("[GC pause (%s) (%s)",
-      GCCause::to_string(_g1->gc_cause()),
-      gcs_are_young() ? "young" : "mixed");
+    gclog_or_tty->print("[%s", (const char*)GCCauseString("GC pause", _g1->gc_cause())
+      .append(gcs_are_young() ? " (young)" : " (mixed)"));
   }
 
   // We only need to do this here as the policy will only be applied