2013-05-28 09:32:06 +02:00
|
|
|
/*
|
2017-07-04 09:16:26 +02:00
|
|
|
* Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
|
2013-05-28 09:32:06 +02:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
|
|
*
|
|
|
|
* This code is free software; you can redistribute it and/or modify it
|
|
|
|
* under the terms of the GNU General Public License version 2 only, as
|
|
|
|
* published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
* version 2 for more details (a copy is included in the LICENSE file that
|
|
|
|
* accompanied this code).
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License version
|
|
|
|
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
|
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*
|
|
|
|
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
|
|
* or visit www.oracle.com if you need additional information or have any
|
|
|
|
* questions.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "precompiled.hpp"
|
2015-05-13 15:16:06 +02:00
|
|
|
#include "gc/g1/concurrentG1Refine.hpp"
|
|
|
|
#include "gc/g1/concurrentG1RefineThread.hpp"
|
|
|
|
#include "gc/g1/g1CollectedHeap.inline.hpp"
|
|
|
|
#include "gc/g1/g1RemSet.inline.hpp"
|
|
|
|
#include "gc/g1/g1RemSetSummary.hpp"
|
2016-05-02 12:07:58 -04:00
|
|
|
#include "gc/g1/g1YoungRemSetSamplingThread.hpp"
|
2015-05-13 15:16:06 +02:00
|
|
|
#include "gc/g1/heapRegion.hpp"
|
|
|
|
#include "gc/g1/heapRegionRemSet.hpp"
|
2015-12-18 14:27:51 +01:00
|
|
|
#include "memory/allocation.inline.hpp"
|
2013-05-28 09:32:06 +02:00
|
|
|
#include "runtime/thread.inline.hpp"
|
|
|
|
|
|
|
|
class GetRSThreadVTimeClosure : public ThreadClosure {
|
|
|
|
private:
|
|
|
|
G1RemSetSummary* _summary;
|
|
|
|
uint _counter;
|
|
|
|
|
|
|
|
public:
|
|
|
|
GetRSThreadVTimeClosure(G1RemSetSummary * summary) : ThreadClosure(), _summary(summary), _counter(0) {
|
|
|
|
assert(_summary != NULL, "just checking");
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual void do_thread(Thread* t) {
|
|
|
|
ConcurrentG1RefineThread* crt = (ConcurrentG1RefineThread*) t;
|
|
|
|
_summary->set_rs_thread_vtime(_counter, crt->vtime_accum());
|
|
|
|
_counter++;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
void G1RemSetSummary::update() {
|
2017-07-04 09:16:26 +02:00
|
|
|
_num_conc_refined_cards = remset()->num_conc_refined_cards();
|
2013-05-28 09:32:06 +02:00
|
|
|
DirtyCardQueueSet& dcqs = JavaThread::dirty_card_queue_set();
|
|
|
|
_num_processed_buf_mutator = dcqs.processed_buffers_mut();
|
|
|
|
_num_processed_buf_rs_threads = dcqs.processed_buffers_rs_thread();
|
|
|
|
|
|
|
|
_num_coarsenings = HeapRegionRemSet::n_coarsenings();
|
|
|
|
|
|
|
|
ConcurrentG1Refine * cg1r = G1CollectedHeap::heap()->concurrent_g1_refine();
|
|
|
|
if (_rs_threads_vtimes != NULL) {
|
|
|
|
GetRSThreadVTimeClosure p(this);
|
|
|
|
cg1r->worker_threads_do(&p);
|
|
|
|
}
|
|
|
|
set_sampling_thread_vtime(cg1r->sampling_thread()->vtime_accum());
|
|
|
|
}
|
|
|
|
|
|
|
|
void G1RemSetSummary::set_rs_thread_vtime(uint thread, double value) {
|
|
|
|
assert(_rs_threads_vtimes != NULL, "just checking");
|
|
|
|
assert(thread < _num_vtimes, "just checking");
|
|
|
|
_rs_threads_vtimes[thread] = value;
|
|
|
|
}
|
|
|
|
|
|
|
|
double G1RemSetSummary::rs_thread_vtime(uint thread) const {
|
|
|
|
assert(_rs_threads_vtimes != NULL, "just checking");
|
|
|
|
assert(thread < _num_vtimes, "just checking");
|
|
|
|
return _rs_threads_vtimes[thread];
|
|
|
|
}
|
|
|
|
|
2013-09-30 12:43:59 +02:00
|
|
|
void G1RemSetSummary::initialize(G1RemSet* remset) {
|
2013-05-28 09:32:06 +02:00
|
|
|
assert(_rs_threads_vtimes == NULL, "just checking");
|
|
|
|
assert(remset != NULL, "just checking");
|
|
|
|
|
|
|
|
_remset = remset;
|
2013-09-30 12:43:59 +02:00
|
|
|
_num_vtimes = ConcurrentG1Refine::thread_num();
|
2013-05-28 09:32:06 +02:00
|
|
|
_rs_threads_vtimes = NEW_C_HEAP_ARRAY(double, _num_vtimes, mtGC);
|
|
|
|
memset(_rs_threads_vtimes, 0, sizeof(double) * _num_vtimes);
|
|
|
|
|
|
|
|
update();
|
|
|
|
}
|
|
|
|
|
2015-12-18 14:27:51 +01:00
|
|
|
G1RemSetSummary::G1RemSetSummary() :
|
|
|
|
_remset(NULL),
|
2017-07-04 09:16:26 +02:00
|
|
|
_num_conc_refined_cards(0),
|
2015-12-18 14:27:51 +01:00
|
|
|
_num_processed_buf_mutator(0),
|
|
|
|
_num_processed_buf_rs_threads(0),
|
|
|
|
_num_coarsenings(0),
|
|
|
|
_rs_threads_vtimes(NULL),
|
|
|
|
_num_vtimes(0),
|
|
|
|
_sampling_thread_vtime(0.0f) {
|
|
|
|
}
|
|
|
|
|
|
|
|
G1RemSetSummary::~G1RemSetSummary() {
|
|
|
|
if (_rs_threads_vtimes) {
|
|
|
|
FREE_C_HEAP_ARRAY(double, _rs_threads_vtimes);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-05-28 09:32:06 +02:00
|
|
|
void G1RemSetSummary::set(G1RemSetSummary* other) {
|
|
|
|
assert(other != NULL, "just checking");
|
|
|
|
assert(remset() == other->remset(), "just checking");
|
|
|
|
assert(_num_vtimes == other->_num_vtimes, "just checking");
|
|
|
|
|
2017-07-04 09:16:26 +02:00
|
|
|
_num_conc_refined_cards = other->num_conc_refined_cards();
|
2013-05-28 09:32:06 +02:00
|
|
|
|
|
|
|
_num_processed_buf_mutator = other->num_processed_buf_mutator();
|
|
|
|
_num_processed_buf_rs_threads = other->num_processed_buf_rs_threads();
|
|
|
|
|
|
|
|
_num_coarsenings = other->_num_coarsenings;
|
|
|
|
|
|
|
|
memcpy(_rs_threads_vtimes, other->_rs_threads_vtimes, sizeof(double) * _num_vtimes);
|
|
|
|
|
|
|
|
set_sampling_thread_vtime(other->sampling_thread_vtime());
|
|
|
|
}
|
|
|
|
|
|
|
|
void G1RemSetSummary::subtract_from(G1RemSetSummary* other) {
|
|
|
|
assert(other != NULL, "just checking");
|
|
|
|
assert(remset() == other->remset(), "just checking");
|
|
|
|
assert(_num_vtimes == other->_num_vtimes, "just checking");
|
|
|
|
|
2017-07-04 09:16:26 +02:00
|
|
|
_num_conc_refined_cards = other->num_conc_refined_cards() - _num_conc_refined_cards;
|
2013-05-28 09:32:06 +02:00
|
|
|
|
|
|
|
_num_processed_buf_mutator = other->num_processed_buf_mutator() - _num_processed_buf_mutator;
|
|
|
|
_num_processed_buf_rs_threads = other->num_processed_buf_rs_threads() - _num_processed_buf_rs_threads;
|
|
|
|
|
|
|
|
_num_coarsenings = other->num_coarsenings() - _num_coarsenings;
|
|
|
|
|
|
|
|
for (uint i = 0; i < _num_vtimes; i++) {
|
|
|
|
set_rs_thread_vtime(i, other->rs_thread_vtime(i) - rs_thread_vtime(i));
|
|
|
|
}
|
|
|
|
|
|
|
|
_sampling_thread_vtime = other->sampling_thread_vtime() - _sampling_thread_vtime;
|
|
|
|
}
|
|
|
|
|
2013-09-26 12:49:45 +02:00
|
|
|
class RegionTypeCounter VALUE_OBJ_CLASS_SPEC {
|
|
|
|
private:
|
|
|
|
const char* _name;
|
|
|
|
|
|
|
|
size_t _rs_mem_size;
|
|
|
|
size_t _cards_occupied;
|
|
|
|
size_t _amount;
|
|
|
|
|
|
|
|
size_t _code_root_mem_size;
|
|
|
|
size_t _code_root_elems;
|
|
|
|
|
|
|
|
double rs_mem_size_percent_of(size_t total) {
|
|
|
|
return percent_of(_rs_mem_size, total);
|
|
|
|
}
|
|
|
|
|
|
|
|
double cards_occupied_percent_of(size_t total) {
|
|
|
|
return percent_of(_cards_occupied, total);
|
|
|
|
}
|
|
|
|
|
|
|
|
double code_root_mem_size_percent_of(size_t total) {
|
|
|
|
return percent_of(_code_root_mem_size, total);
|
|
|
|
}
|
|
|
|
|
|
|
|
double code_root_elems_percent_of(size_t total) {
|
|
|
|
return percent_of(_code_root_elems, total);
|
|
|
|
}
|
|
|
|
|
|
|
|
size_t amount() const { return _amount; }
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
RegionTypeCounter(const char* name) : _name(name), _rs_mem_size(0), _cards_occupied(0),
|
|
|
|
_amount(0), _code_root_mem_size(0), _code_root_elems(0) { }
|
|
|
|
|
|
|
|
void add(size_t rs_mem_size, size_t cards_occupied, size_t code_root_mem_size,
|
|
|
|
size_t code_root_elems) {
|
|
|
|
_rs_mem_size += rs_mem_size;
|
|
|
|
_cards_occupied += cards_occupied;
|
|
|
|
_code_root_mem_size += code_root_mem_size;
|
|
|
|
_code_root_elems += code_root_elems;
|
|
|
|
_amount++;
|
|
|
|
}
|
|
|
|
|
|
|
|
size_t rs_mem_size() const { return _rs_mem_size; }
|
|
|
|
size_t cards_occupied() const { return _cards_occupied; }
|
|
|
|
|
|
|
|
size_t code_root_mem_size() const { return _code_root_mem_size; }
|
|
|
|
size_t code_root_elems() const { return _code_root_elems; }
|
|
|
|
|
|
|
|
void print_rs_mem_info_on(outputStream * out, size_t total) {
|
2016-05-02 13:28:08 +05:30
|
|
|
out->print_cr(" " SIZE_FORMAT_W(8) "%s (%5.1f%%) by " SIZE_FORMAT " %s regions",
|
|
|
|
byte_size_in_proper_unit(rs_mem_size()),
|
|
|
|
proper_unit_for_byte_size(rs_mem_size()),
|
|
|
|
rs_mem_size_percent_of(total), amount(), _name);
|
2013-09-26 12:49:45 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void print_cards_occupied_info_on(outputStream * out, size_t total) {
|
2015-06-24 12:12:25 -04:00
|
|
|
out->print_cr(" " SIZE_FORMAT_W(8) " (%5.1f%%) entries by " SIZE_FORMAT " %s regions",
|
2013-10-22 11:50:12 +02:00
|
|
|
cards_occupied(), cards_occupied_percent_of(total), amount(), _name);
|
2013-09-26 12:49:45 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void print_code_root_mem_info_on(outputStream * out, size_t total) {
|
2016-05-02 13:28:08 +05:30
|
|
|
out->print_cr(" " SIZE_FORMAT_W(8) "%s (%5.1f%%) by " SIZE_FORMAT " %s regions",
|
|
|
|
byte_size_in_proper_unit(code_root_mem_size()),
|
|
|
|
proper_unit_for_byte_size(code_root_mem_size()),
|
|
|
|
code_root_mem_size_percent_of(total), amount(), _name);
|
2013-09-26 12:49:45 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void print_code_root_elems_info_on(outputStream * out, size_t total) {
|
2015-06-24 12:12:25 -04:00
|
|
|
out->print_cr(" " SIZE_FORMAT_W(8) " (%5.1f%%) elements by " SIZE_FORMAT " %s regions",
|
2013-10-22 11:50:12 +02:00
|
|
|
code_root_elems(), code_root_elems_percent_of(total), amount(), _name);
|
2013-09-26 12:49:45 +02:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2013-05-28 09:32:06 +02:00
|
|
|
class HRRSStatsIter: public HeapRegionClosure {
|
2013-09-26 12:49:45 +02:00
|
|
|
private:
|
|
|
|
RegionTypeCounter _young;
|
2016-02-03 18:18:00 +01:00
|
|
|
RegionTypeCounter _humongous;
|
2013-09-26 12:49:45 +02:00
|
|
|
RegionTypeCounter _free;
|
|
|
|
RegionTypeCounter _old;
|
|
|
|
RegionTypeCounter _all;
|
2013-08-15 10:52:18 +02:00
|
|
|
|
|
|
|
size_t _max_rs_mem_sz;
|
|
|
|
HeapRegion* _max_rs_mem_sz_region;
|
|
|
|
|
2013-09-26 12:49:45 +02:00
|
|
|
size_t total_rs_mem_sz() const { return _all.rs_mem_size(); }
|
|
|
|
size_t total_cards_occupied() const { return _all.cards_occupied(); }
|
|
|
|
|
|
|
|
size_t max_rs_mem_sz() const { return _max_rs_mem_sz; }
|
|
|
|
HeapRegion* max_rs_mem_sz_region() const { return _max_rs_mem_sz_region; }
|
|
|
|
|
2013-08-15 10:52:18 +02:00
|
|
|
size_t _max_code_root_mem_sz;
|
|
|
|
HeapRegion* _max_code_root_mem_sz_region;
|
2013-09-26 12:49:45 +02:00
|
|
|
|
|
|
|
size_t total_code_root_mem_sz() const { return _all.code_root_mem_size(); }
|
|
|
|
size_t total_code_root_elems() const { return _all.code_root_elems(); }
|
|
|
|
|
|
|
|
size_t max_code_root_mem_sz() const { return _max_code_root_mem_sz; }
|
|
|
|
HeapRegion* max_code_root_mem_sz_region() const { return _max_code_root_mem_sz_region; }
|
|
|
|
|
2013-05-28 09:32:06 +02:00
|
|
|
public:
|
2016-02-03 18:18:00 +01:00
|
|
|
HRRSStatsIter() : _all("All"), _young("Young"), _humongous("Humongous"),
|
2013-09-26 12:49:45 +02:00
|
|
|
_free("Free"), _old("Old"), _max_code_root_mem_sz_region(NULL), _max_rs_mem_sz_region(NULL),
|
|
|
|
_max_rs_mem_sz(0), _max_code_root_mem_sz(0)
|
2013-05-28 09:32:06 +02:00
|
|
|
{}
|
|
|
|
|
|
|
|
bool doHeapRegion(HeapRegion* r) {
|
2013-08-15 10:52:18 +02:00
|
|
|
HeapRegionRemSet* hrrs = r->rem_set();
|
|
|
|
|
|
|
|
// HeapRegionRemSet::mem_size() includes the
|
|
|
|
// size of the strong code roots
|
|
|
|
size_t rs_mem_sz = hrrs->mem_size();
|
|
|
|
if (rs_mem_sz > _max_rs_mem_sz) {
|
|
|
|
_max_rs_mem_sz = rs_mem_sz;
|
|
|
|
_max_rs_mem_sz_region = r;
|
|
|
|
}
|
2013-09-26 12:49:45 +02:00
|
|
|
size_t occupied_cards = hrrs->occupied();
|
2013-08-15 10:52:18 +02:00
|
|
|
size_t code_root_mem_sz = hrrs->strong_code_roots_mem_size();
|
2013-09-26 12:49:45 +02:00
|
|
|
if (code_root_mem_sz > max_code_root_mem_sz()) {
|
2014-08-29 13:12:21 +02:00
|
|
|
_max_code_root_mem_sz = code_root_mem_sz;
|
2013-08-15 10:52:18 +02:00
|
|
|
_max_code_root_mem_sz_region = r;
|
2013-05-28 09:32:06 +02:00
|
|
|
}
|
2013-09-26 12:49:45 +02:00
|
|
|
size_t code_root_elems = hrrs->strong_code_roots_list_length();
|
|
|
|
|
|
|
|
RegionTypeCounter* current = NULL;
|
2014-09-15 12:19:31 +02:00
|
|
|
if (r->is_free()) {
|
|
|
|
current = &_free;
|
|
|
|
} else if (r->is_young()) {
|
2013-09-26 12:49:45 +02:00
|
|
|
current = &_young;
|
2014-09-23 11:43:24 +02:00
|
|
|
} else if (r->is_humongous()) {
|
2016-02-03 18:18:00 +01:00
|
|
|
current = &_humongous;
|
2014-09-15 12:19:31 +02:00
|
|
|
} else if (r->is_old()) {
|
2013-09-26 12:49:45 +02:00
|
|
|
current = &_old;
|
2014-09-15 12:19:31 +02:00
|
|
|
} else {
|
|
|
|
ShouldNotReachHere();
|
2013-09-26 12:49:45 +02:00
|
|
|
}
|
|
|
|
current->add(rs_mem_sz, occupied_cards, code_root_mem_sz, code_root_elems);
|
|
|
|
_all.add(rs_mem_sz, occupied_cards, code_root_mem_sz, code_root_elems);
|
2013-08-15 10:52:18 +02:00
|
|
|
|
2013-05-28 09:32:06 +02:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2013-09-26 12:49:45 +02:00
|
|
|
void print_summary_on(outputStream* out) {
|
2016-02-03 18:18:00 +01:00
|
|
|
RegionTypeCounter* counters[] = { &_young, &_humongous, &_free, &_old, NULL };
|
2013-09-26 12:49:45 +02:00
|
|
|
|
2015-12-10 14:57:55 +01:00
|
|
|
out->print_cr(" Current rem set statistics");
|
2016-05-02 13:28:08 +05:30
|
|
|
out->print_cr(" Total per region rem sets sizes = " SIZE_FORMAT "%s."
|
|
|
|
" Max = " SIZE_FORMAT "%s.",
|
|
|
|
byte_size_in_proper_unit(total_rs_mem_sz()),
|
|
|
|
proper_unit_for_byte_size(total_rs_mem_sz()),
|
|
|
|
byte_size_in_proper_unit(max_rs_mem_sz()),
|
|
|
|
proper_unit_for_byte_size(max_rs_mem_sz()));
|
2013-09-26 12:49:45 +02:00
|
|
|
for (RegionTypeCounter** current = &counters[0]; *current != NULL; current++) {
|
|
|
|
(*current)->print_rs_mem_info_on(out, total_rs_mem_sz());
|
|
|
|
}
|
|
|
|
|
2016-05-02 13:28:08 +05:30
|
|
|
out->print_cr(" Static structures = " SIZE_FORMAT "%s,"
|
|
|
|
" free_lists = " SIZE_FORMAT "%s.",
|
|
|
|
byte_size_in_proper_unit(HeapRegionRemSet::static_mem_size()),
|
|
|
|
proper_unit_for_byte_size(HeapRegionRemSet::static_mem_size()),
|
|
|
|
byte_size_in_proper_unit(HeapRegionRemSet::fl_mem_size()),
|
|
|
|
proper_unit_for_byte_size(HeapRegionRemSet::fl_mem_size()));
|
2013-09-26 12:49:45 +02:00
|
|
|
|
2015-06-24 12:12:25 -04:00
|
|
|
out->print_cr(" " SIZE_FORMAT " occupied cards represented.",
|
2013-09-26 12:49:45 +02:00
|
|
|
total_cards_occupied());
|
|
|
|
for (RegionTypeCounter** current = &counters[0]; *current != NULL; current++) {
|
|
|
|
(*current)->print_cards_occupied_info_on(out, total_cards_occupied());
|
|
|
|
}
|
|
|
|
|
|
|
|
// Largest sized rem set region statistics
|
|
|
|
HeapRegionRemSet* rem_set = max_rs_mem_sz_region()->rem_set();
|
2015-06-24 12:12:25 -04:00
|
|
|
out->print_cr(" Region with largest rem set = " HR_FORMAT ", "
|
2016-05-02 13:28:08 +05:30
|
|
|
"size = " SIZE_FORMAT "%s, occupied = " SIZE_FORMAT "%s.",
|
2013-09-26 12:49:45 +02:00
|
|
|
HR_FORMAT_PARAMS(max_rs_mem_sz_region()),
|
2016-05-02 13:28:08 +05:30
|
|
|
byte_size_in_proper_unit(rem_set->mem_size()),
|
|
|
|
proper_unit_for_byte_size(rem_set->mem_size()),
|
|
|
|
byte_size_in_proper_unit(rem_set->occupied()),
|
|
|
|
proper_unit_for_byte_size(rem_set->occupied()));
|
2013-09-26 12:49:45 +02:00
|
|
|
// Strong code root statistics
|
|
|
|
HeapRegionRemSet* max_code_root_rem_set = max_code_root_mem_sz_region()->rem_set();
|
2016-05-02 13:28:08 +05:30
|
|
|
out->print_cr(" Total heap region code root sets sizes = " SIZE_FORMAT "%s."
|
|
|
|
" Max = " SIZE_FORMAT "%s.",
|
|
|
|
byte_size_in_proper_unit(total_code_root_mem_sz()),
|
|
|
|
proper_unit_for_byte_size(total_code_root_mem_sz()),
|
|
|
|
byte_size_in_proper_unit(max_code_root_rem_set->strong_code_roots_mem_size()),
|
|
|
|
proper_unit_for_byte_size(max_code_root_rem_set->strong_code_roots_mem_size()));
|
2013-09-26 12:49:45 +02:00
|
|
|
for (RegionTypeCounter** current = &counters[0]; *current != NULL; current++) {
|
|
|
|
(*current)->print_code_root_mem_info_on(out, total_code_root_mem_sz());
|
|
|
|
}
|
|
|
|
|
2015-06-24 12:12:25 -04:00
|
|
|
out->print_cr(" " SIZE_FORMAT " code roots represented.",
|
2013-09-26 12:49:45 +02:00
|
|
|
total_code_root_elems());
|
|
|
|
for (RegionTypeCounter** current = &counters[0]; *current != NULL; current++) {
|
|
|
|
(*current)->print_code_root_elems_info_on(out, total_code_root_elems());
|
|
|
|
}
|
|
|
|
|
2015-06-24 12:12:25 -04:00
|
|
|
out->print_cr(" Region with largest amount of code roots = " HR_FORMAT ", "
|
2016-05-02 13:28:08 +05:30
|
|
|
"size = " SIZE_FORMAT "%s, num_elems = " SIZE_FORMAT ".",
|
2013-09-26 12:49:45 +02:00
|
|
|
HR_FORMAT_PARAMS(max_code_root_mem_sz_region()),
|
2016-05-02 13:28:08 +05:30
|
|
|
byte_size_in_proper_unit(max_code_root_rem_set->strong_code_roots_mem_size()),
|
|
|
|
proper_unit_for_byte_size(max_code_root_rem_set->strong_code_roots_mem_size()),
|
|
|
|
max_code_root_rem_set->strong_code_roots_list_length());
|
2013-05-28 09:32:06 +02:00
|
|
|
}
|
2013-09-26 12:49:45 +02:00
|
|
|
};
|
2013-05-28 09:32:06 +02:00
|
|
|
|
|
|
|
void G1RemSetSummary::print_on(outputStream* out) {
|
2015-12-10 14:57:55 +01:00
|
|
|
out->print_cr(" Recent concurrent refinement statistics");
|
2017-07-04 09:16:26 +02:00
|
|
|
out->print_cr(" Processed " SIZE_FORMAT " cards concurrently", num_conc_refined_cards());
|
2015-06-24 12:12:25 -04:00
|
|
|
out->print_cr(" Of " SIZE_FORMAT " completed buffers:", num_processed_buf_total());
|
|
|
|
out->print_cr(" " SIZE_FORMAT_W(8) " (%5.1f%%) by concurrent RS threads.",
|
2013-05-28 09:32:06 +02:00
|
|
|
num_processed_buf_total(),
|
2013-09-26 12:49:45 +02:00
|
|
|
percent_of(num_processed_buf_rs_threads(), num_processed_buf_total()));
|
2015-06-24 12:12:25 -04:00
|
|
|
out->print_cr(" " SIZE_FORMAT_W(8) " (%5.1f%%) by mutator threads.",
|
2013-05-28 09:32:06 +02:00
|
|
|
num_processed_buf_mutator(),
|
2013-09-26 12:49:45 +02:00
|
|
|
percent_of(num_processed_buf_mutator(), num_processed_buf_total()));
|
2015-06-24 12:12:25 -04:00
|
|
|
out->print_cr(" Did " SIZE_FORMAT " coarsenings.", num_coarsenings());
|
2013-05-28 09:32:06 +02:00
|
|
|
out->print_cr(" Concurrent RS threads times (s)");
|
|
|
|
out->print(" ");
|
|
|
|
for (uint i = 0; i < _num_vtimes; i++) {
|
|
|
|
out->print(" %5.2f", rs_thread_vtime(i));
|
|
|
|
}
|
|
|
|
out->cr();
|
|
|
|
out->print_cr(" Concurrent sampling threads times (s)");
|
|
|
|
out->print_cr(" %5.2f", sampling_thread_vtime());
|
|
|
|
|
|
|
|
HRRSStatsIter blk;
|
|
|
|
G1CollectedHeap::heap()->heap_region_iterate(&blk);
|
2013-09-26 12:49:45 +02:00
|
|
|
blk.print_summary_on(out);
|
2013-05-28 09:32:06 +02:00
|
|
|
}
|