mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
6543938: G1: remove the concept of popularity
Reviewed-by: iveresov, tonyp
This commit is contained in:
parent
cb822b7e10
commit
cf2ae8d98d
19 changed files with 101 additions and 1074 deletions
|
@ -74,7 +74,6 @@ HeapRegionSeq::alloc_obj_from_region_index(int ind, size_t word_size) {
|
|||
// [first, cur)
|
||||
HeapRegion* curhr = _regions.at(cur);
|
||||
if (curhr->is_empty()
|
||||
&& !curhr->is_reserved()
|
||||
&& (first == cur
|
||||
|| (_regions.at(cur-1)->end() ==
|
||||
curhr->bottom()))) {
|
||||
|
@ -121,35 +120,27 @@ HeapRegionSeq::alloc_obj_from_region_index(int ind, size_t word_size) {
|
|||
}
|
||||
}
|
||||
|
||||
void HeapRegionSeq::print_empty_runs(bool reserved_are_empty) {
|
||||
void HeapRegionSeq::print_empty_runs() {
|
||||
int empty_run = 0;
|
||||
int n_empty = 0;
|
||||
bool at_least_one_reserved = false;
|
||||
int empty_run_start;
|
||||
for (int i = 0; i < _regions.length(); i++) {
|
||||
HeapRegion* r = _regions.at(i);
|
||||
if (r->continuesHumongous()) continue;
|
||||
if (r->is_empty() && (reserved_are_empty || !r->is_reserved())) {
|
||||
if (r->is_empty()) {
|
||||
assert(!r->isHumongous(), "H regions should not be empty.");
|
||||
if (empty_run == 0) empty_run_start = i;
|
||||
empty_run++;
|
||||
n_empty++;
|
||||
if (r->is_reserved()) {
|
||||
at_least_one_reserved = true;
|
||||
}
|
||||
} else {
|
||||
if (empty_run > 0) {
|
||||
gclog_or_tty->print(" %d:%d", empty_run_start, empty_run);
|
||||
if (reserved_are_empty && at_least_one_reserved)
|
||||
gclog_or_tty->print("(R)");
|
||||
empty_run = 0;
|
||||
at_least_one_reserved = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (empty_run > 0) {
|
||||
gclog_or_tty->print(" %d:%d", empty_run_start, empty_run);
|
||||
if (reserved_are_empty && at_least_one_reserved) gclog_or_tty->print("(R)");
|
||||
}
|
||||
gclog_or_tty->print_cr(" [tot = %d]", n_empty);
|
||||
}
|
||||
|
@ -193,7 +184,6 @@ size_t HeapRegionSeq::free_suffix() {
|
|||
int cur = first;
|
||||
while (cur >= 0 &&
|
||||
(_regions.at(cur)->is_empty()
|
||||
&& !_regions.at(cur)->is_reserved()
|
||||
&& (first == cur
|
||||
|| (_regions.at(cur+1)->bottom() ==
|
||||
_regions.at(cur)->end())))) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue