< prev index next >

src/share/vm/gc/shared/ageTable.cpp

Print this page

        

*** 26,35 **** --- 26,36 ---- #include "gc/shared/ageTable.hpp" #include "gc/shared/collectedHeap.hpp" #include "gc/shared/collectorPolicy.hpp" #include "gc/shared/gcPolicyCounters.hpp" #include "memory/resourceArea.hpp" + #include "logging/log.hpp" #include "utilities/copy.hpp" /* Copyright (c) 1992, 2015, Oracle and/or its affiliates, and Stanford University. See the LICENSE file for license information. */
*** 92,120 **** age++; } result = age < MaxTenuringThreshold ? age : MaxTenuringThreshold; } - if (PrintTenuringDistribution || UsePerfData) { ! if (PrintTenuringDistribution) { ! gclog_or_tty->cr(); ! gclog_or_tty->print_cr("Desired survivor size " SIZE_FORMAT " bytes, new threshold " ! UINTX_FORMAT " (max threshold " UINTX_FORMAT ")", desired_survivor_size*oopSize, (uintx) result, MaxTenuringThreshold); - } size_t total = 0; uint age = 1; while (age < table_size) { total += sizes[age]; if (sizes[age] > 0) { ! if (PrintTenuringDistribution) { ! gclog_or_tty->print_cr("- age %3u: " SIZE_FORMAT_W(10) " bytes, " SIZE_FORMAT_W(10) " total", age, sizes[age]*oopSize, total*oopSize); } - } if (UsePerfData) { _perf_sizes[age]->set_value(sizes[age]*oopSize); } age++; } --- 93,115 ---- age++; } result = age < MaxTenuringThreshold ? age : MaxTenuringThreshold; } ! log_debug(gc, age)("Desired survivor size " SIZE_FORMAT " bytes, new threshold " UINTX_FORMAT " (max threshold " UINTX_FORMAT ")", desired_survivor_size*oopSize, (uintx) result, MaxTenuringThreshold); + if (Log<LOG_TAGS(gc, age)>::is_trace() || UsePerfData) { size_t total = 0; uint age = 1; while (age < table_size) { total += sizes[age]; if (sizes[age] > 0) { ! log_trace(gc, age)("- age %3u: " SIZE_FORMAT_W(10) " bytes, " SIZE_FORMAT_W(10) " total", age, sizes[age]*oopSize, total*oopSize); } if (UsePerfData) { _perf_sizes[age]->set_value(sizes[age]*oopSize); } age++; }
< prev index next >