< prev index next >

src/share/vm/gc/g1/survRateGroup.cpp

Print this page

        

*** 25,34 **** --- 25,35 ---- #include "precompiled.hpp" #include "gc/g1/g1CollectedHeap.inline.hpp" #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, const char* name, size_t summary_surv_rates_len) :
*** 161,174 **** _last_pred = pred; } #ifndef PRODUCT void SurvRateGroup::print() { ! 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 " 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); } } --- 162,174 ---- _last_pred = pred; } #ifndef PRODUCT void SurvRateGroup::print() { ! log_develop(gc, survivor)("Surv Rate Group: %s (" SIZE_FORMAT " entries)", _name, _region_num); for (size_t i = 0; i < _region_num; ++i) { ! 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); } }
*** 176,201 **** SurvRateGroup::print_surv_rate_summary() { size_t length = _summary_surv_rates_max_len; 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(" ---------------------------------------------------------"); 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()); ++index; } ! gclog_or_tty->print_cr(" ---------------------------------------------------------"); int num = 0; double sum = 0.0; int samples = 0; while (index < length) { --- 176,200 ---- SurvRateGroup::print_surv_rate_summary() { size_t length = _summary_surv_rates_max_len; if (length == 0) return; ! 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) { ! 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; } ! log_debug(gc, survivor, stats)(" ---------------------------------------------------------"); int num = 0; double sum = 0.0; int samples = 0; while (index < length) {
*** 203,220 **** sum += _summary_surv_rates[index]->avg() * 100.0; samples += _summary_surv_rates[index]->num(); ++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); sum = 0.0; num = 0; samples = 0; } } ! gclog_or_tty->print_cr(" ---------------------------------------------------------"); } #endif // PRODUCT --- 202,219 ---- sum += _summary_surv_rates[index]->avg() * 100.0; samples += _summary_surv_rates[index]->num(); ++index; if (index == length || num % 10 == 0) { ! 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; } } ! log_debug(gc, survivor, stats)(" ---------------------------------------------------------"); } #endif // PRODUCT
< prev index next >