8353471: ZGC: Redundant generation id in ZGeneration

Reviewed-by: stefank, eosterlund
This commit is contained in:
Joel Sikström 2025-04-04 11:53:11 +00:00
parent cfcb3305f0
commit b92a44364d
2 changed files with 6 additions and 6 deletions

View File

@ -182,9 +182,9 @@ static double fragmentation_limit(ZGenerationId generation) {
}
}
void ZGeneration::select_relocation_set(ZGenerationId generation, bool promote_all) {
void ZGeneration::select_relocation_set(bool promote_all) {
// Register relocatable pages with selector
ZRelocationSetSelector selector(fragmentation_limit(generation));
ZRelocationSetSelector selector(fragmentation_limit(_id));
{
ZGenerationPagesIterator pt_iter(_page_table, _id, _page_allocator);
for (ZPage* page; pt_iter.next(&page);) {
@ -238,7 +238,7 @@ void ZGeneration::select_relocation_set(ZGenerationId generation, bool promote_a
// Selecting tenuring threshold must be done after select
// which produces the liveness data, but before install,
// which consumes the tenuring threshold.
if (generation == ZGenerationId::young) {
if (is_young()) {
ZGeneration::young()->select_tenuring_threshold(selector.stats(), promote_all);
}
@ -811,7 +811,7 @@ uint ZGenerationYoung::compute_tenuring_threshold(ZRelocationSetSelectorStats st
void ZGenerationYoung::concurrent_select_relocation_set() {
ZStatTimerYoung timer(ZPhaseConcurrentSelectRelocationSetYoung);
const bool promote_all = type() == ZYoungType::major_full_preclean;
select_relocation_set(_id, promote_all);
select_relocation_set(promote_all);
}
class VM_ZRelocateStartYoung : public VM_ZYoungOperation {
@ -1153,7 +1153,7 @@ void ZGenerationOld::pause_verify() {
void ZGenerationOld::concurrent_select_relocation_set() {
ZStatTimerOld timer(ZPhaseConcurrentSelectRelocationSetOld);
select_relocation_set(_id, false /* promote_all */);
select_relocation_set(false /* promote_all */);
}
class VM_ZRelocateStartOld : public VM_ZOperation {

View File

@ -91,7 +91,7 @@ protected:
void mark_free();
void select_relocation_set(ZGenerationId generation, bool promote_all);
void select_relocation_set(bool promote_all);
void reset_relocation_set();
ZGeneration(ZGenerationId id, ZPageTable* page_table, ZPageAllocator* page_allocator);