--- old/src/share/vm/gc/g1/survRateGroup.cpp 2015-11-19 15:35:10.710129142 +0100 +++ new/src/share/vm/gc/g1/survRateGroup.cpp 2015-11-19 15:35:10.594129146 +0100 @@ -27,6 +27,7 @@ #include "gc/g1/g1Predictions.hpp" #include "gc/g1/heapRegion.hpp" #include "gc/g1/survRateGroup.hpp" +#include "logging/log.hpp" #include "memory/allocation.hpp" SurvRateGroup::SurvRateGroup(G1Predictions* predictor, @@ -163,12 +164,11 @@ #ifndef PRODUCT void SurvRateGroup::print() { - gclog_or_tty->print_cr("Surv Rate Group: %s (" SIZE_FORMAT " entries)", - _name, _region_num); + log_develop(gc, survivor)("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 " SIZE_FORMAT_W(4) " surv rate %6.2lf %% pred %6.2lf %%", - i, _surv_rate[i] * 100.0, - _predictor->get_new_prediction(_surv_rate_pred[i]) * 100.0); + log_develop(gc, survivor)(" age " SIZE_FORMAT_W(4) " surv rate %6.2lf %% pred %6.2lf %%", + i, _surv_rate[i] * 100.0, + _predictor->get_new_prediction(_surv_rate_pred[i]) * 100.0); } } @@ -178,22 +178,21 @@ if (length == 0) return; - gclog_or_tty->cr(); - 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(" ---------------------------------------------------------"); + log_debug(gc, survivor, stats)("%s Rate Summary (for up to age " SIZE_FORMAT ")", _name, length-1); + log_debug(gc, survivor, stats)(" age range survival rate (avg) samples (avg)"); + log_debug(gc, survivor, stats)(" ---------------------------------------------------------"); size_t index = 0; size_t limit = MIN2((int) length, 10); while (index < limit) { - 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()); + log_debug(gc, survivor, stats)(" " SIZE_FORMAT_W(4) + " %6.2lf%% %6.2lf", + index, _summary_surv_rates[index]->avg() * 100.0, + (double) _summary_surv_rates[index]->num()); ++index; } - gclog_or_tty->print_cr(" ---------------------------------------------------------"); + log_debug(gc, survivor, stats)(" ---------------------------------------------------------"); int num = 0; double sum = 0.0; @@ -205,16 +204,16 @@ ++index; if (index == length || num % 10 == 0) { - 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); + log_debug(gc, survivor, stats)(" " 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; num = 0; samples = 0; } } - gclog_or_tty->print_cr(" ---------------------------------------------------------"); + log_debug(gc, survivor, stats)(" ---------------------------------------------------------"); } #endif // PRODUCT