hotspot/src/share/vm/gc_implementation/g1/survRateGroup.cpp
changeset 24092 e274d864545a
parent 13195 be27e1b6a4b9
child 24424 2658d7834c6e
--- a/hotspot/src/share/vm/gc_implementation/g1/survRateGroup.cpp	Tue Apr 08 13:50:58 2014 +0200
+++ b/hotspot/src/share/vm/gc_implementation/g1/survRateGroup.cpp	Wed Apr 09 13:54:32 2014 +0200
@@ -187,10 +187,10 @@
 #ifndef PRODUCT
 void
 SurvRateGroup::print() {
-  gclog_or_tty->print_cr("Surv Rate Group: %s (%d entries)",
+  gclog_or_tty->print_cr("Surv Rate Group: %s (" SIZE_FORMAT " entries)",
                 _name, _region_num);
   for (size_t i = 0; i < _region_num; ++i) {
-    gclog_or_tty->print_cr("    age %4d   surv rate %6.2lf %%   pred %6.2lf %%",
+    gclog_or_tty->print_cr("    age " SIZE_FORMAT_W(4) "   surv rate %6.2lf %%   pred %6.2lf %%",
                   i, _surv_rate[i] * 100.0,
                   _g1p->get_new_prediction(_surv_rate_pred[i]) * 100.0);
   }
@@ -203,14 +203,15 @@
     return;
 
   gclog_or_tty->print_cr("");
-  gclog_or_tty->print_cr("%s Rate Summary (for up to age %d)", _name, length-1);
+  gclog_or_tty->print_cr("%s Rate Summary (for up to age " SIZE_FORMAT ")", _name, length-1);
   gclog_or_tty->print_cr("      age range     survival rate (avg)      samples (avg)");
   gclog_or_tty->print_cr("  ---------------------------------------------------------");
 
   size_t index = 0;
   size_t limit = MIN2((int) length, 10);
   while (index < limit) {
-    gclog_or_tty->print_cr("           %4d                 %6.2lf%%             %6.2lf",
+    gclog_or_tty->print_cr("           " SIZE_FORMAT_W(4)
+                  "                 %6.2lf%%             %6.2lf",
                   index, _summary_surv_rates[index]->avg() * 100.0,
                   (double) _summary_surv_rates[index]->num());
     ++index;
@@ -228,7 +229,8 @@
     ++index;
 
     if (index == length || num % 10 == 0) {
-      gclog_or_tty->print_cr("   %4d .. %4d                 %6.2lf%%             %6.2lf",
+      gclog_or_tty->print_cr("   " SIZE_FORMAT_W(4) " .. " SIZE_FORMAT_W(4)
+                    "                 %6.2lf%%             %6.2lf",
                     (index-1) / 10 * 10, index-1, sum / (double) num,
                     (double) samples / (double) num);
       sum = 0.0;