Skip to content

Commit 858b4f1

Browse files
kdnilsenY. Srinivas Ramakrishna
authored and
Y. Srinivas Ramakrishna
committed
8339960: GenShen: Fix inconsistencies in generational Shenandoah behavior
Reviewed-by: wkemper, rkennke
1 parent 59407fa commit 858b4f1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,7 +1009,9 @@ void ShenandoahFreeSet::find_regions_with_alloc_capacity(size_t &cset_regions) {
10091009
}
10101010
}
10111011
}
1012-
_partitions.establish_mutator_intervals(mutator_leftmost, mutator_rightmost, mutator_leftmost_empty, mutator_rightmost_empty,
1012+
idx_t rightmost_idx = (mutator_leftmost == max_regions)? -1: (idx_t) mutator_rightmost;
1013+
idx_t rightmost_empty_idx = (mutator_leftmost_empty == max_regions)? -1: (idx_t) mutator_rightmost_empty;
1014+
_partitions.establish_mutator_intervals(mutator_leftmost, rightmost_idx, mutator_leftmost_empty, rightmost_empty_idx,
10131015
mutator_regions, mutator_used);
10141016
}
10151017

@@ -1134,7 +1136,7 @@ void ShenandoahFreeSet::reserve_regions(size_t to_reserve) {
11341136
}
11351137

11361138
if (LogTarget(Info, gc, free)::is_enabled()) {
1137-
size_t reserve = _partitions.capacity_of(ShenandoahFreeSetPartitionId::Collector);
1139+
size_t reserve = _partitions.available_in(ShenandoahFreeSetPartitionId::Collector);
11381140
if (reserve < to_reserve) {
11391141
log_debug(gc)("Wanted " PROPERFMT " for young reserve, but only reserved: " PROPERFMT,
11401142
PROPERFMTARGS(to_reserve), PROPERFMTARGS(reserve));

0 commit comments

Comments
 (0)