Skip to content

Commit b92a443

Browse files
committed
8353471: ZGC: Redundant generation id in ZGeneration
Reviewed-by: stefank, eosterlund
1 parent cfcb330 commit b92a443

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/hotspot/share/gc/z/zGeneration.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,9 @@ static double fragmentation_limit(ZGenerationId generation) {
182182
}
183183
}
184184

185-
void ZGeneration::select_relocation_set(ZGenerationId generation, bool promote_all) {
185+
void ZGeneration::select_relocation_set(bool promote_all) {
186186
// Register relocatable pages with selector
187-
ZRelocationSetSelector selector(fragmentation_limit(generation));
187+
ZRelocationSetSelector selector(fragmentation_limit(_id));
188188
{
189189
ZGenerationPagesIterator pt_iter(_page_table, _id, _page_allocator);
190190
for (ZPage* page; pt_iter.next(&page);) {
@@ -238,7 +238,7 @@ void ZGeneration::select_relocation_set(ZGenerationId generation, bool promote_a
238238
// Selecting tenuring threshold must be done after select
239239
// which produces the liveness data, but before install,
240240
// which consumes the tenuring threshold.
241-
if (generation == ZGenerationId::young) {
241+
if (is_young()) {
242242
ZGeneration::young()->select_tenuring_threshold(selector.stats(), promote_all);
243243
}
244244

@@ -811,7 +811,7 @@ uint ZGenerationYoung::compute_tenuring_threshold(ZRelocationSetSelectorStats st
811811
void ZGenerationYoung::concurrent_select_relocation_set() {
812812
ZStatTimerYoung timer(ZPhaseConcurrentSelectRelocationSetYoung);
813813
const bool promote_all = type() == ZYoungType::major_full_preclean;
814-
select_relocation_set(_id, promote_all);
814+
select_relocation_set(promote_all);
815815
}
816816

817817
class VM_ZRelocateStartYoung : public VM_ZYoungOperation {
@@ -1153,7 +1153,7 @@ void ZGenerationOld::pause_verify() {
11531153

11541154
void ZGenerationOld::concurrent_select_relocation_set() {
11551155
ZStatTimerOld timer(ZPhaseConcurrentSelectRelocationSetOld);
1156-
select_relocation_set(_id, false /* promote_all */);
1156+
select_relocation_set(false /* promote_all */);
11571157
}
11581158

11591159
class VM_ZRelocateStartOld : public VM_ZOperation {

src/hotspot/share/gc/z/zGeneration.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class ZGeneration {
9191

9292
void mark_free();
9393

94-
void select_relocation_set(ZGenerationId generation, bool promote_all);
94+
void select_relocation_set(bool promote_all);
9595
void reset_relocation_set();
9696

9797
ZGeneration(ZGenerationId id, ZPageTable* page_table, ZPageAllocator* page_allocator);

0 commit comments

Comments
 (0)