Skip to content

Commit 9a0fde4

Browse files
author
Thomas Schatzl
committed
8367765: G1: Merge G1UpdateRegionLivenessAndSelectForRebuild task and collection set choosing
Reviewed-by: ayang, iwalulya
1 parent 1741837 commit 9a0fde4

9 files changed

Lines changed: 122 additions & 384 deletions

src/hotspot/share/gc/g1/g1CollectionSetCandidates.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2019, 2026, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,6 @@
2323
*/
2424

2525
#include "gc/g1/g1CollectionSetCandidates.inline.hpp"
26-
#include "gc/g1/g1CollectionSetChooser.hpp"
2726
#include "gc/g1/g1HeapRegion.inline.hpp"
2827
#include "utilities/growableArray.hpp"
2928

@@ -250,8 +249,9 @@ void G1CollectionSetCandidates::sort_marking_by_efficiency() {
250249
_from_marking_groups.verify();
251250
}
252251

253-
void G1CollectionSetCandidates::set_candidates_from_marking(G1HeapRegion** candidates,
254-
uint num_candidates) {
252+
void G1CollectionSetCandidates::set_candidates_from_marking(GrowableArrayCHeap<G1HeapRegion*, mtGC>* candidates) {
253+
uint num_candidates = candidates->length();
254+
255255
if (num_candidates == 0) {
256256
log_debug(gc, ergo, cset) ("No regions selected from marking.");
257257
return;
@@ -273,7 +273,7 @@ void G1CollectionSetCandidates::set_candidates_from_marking(G1HeapRegion** candi
273273
current = new G1CSetCandidateGroup();
274274

275275
for (uint i = 0; i < num_candidates; i++) {
276-
G1HeapRegion* r = candidates[i];
276+
G1HeapRegion* r = candidates->at(i);
277277
assert(!contains(r), "must not contain region %u", r->hrm_index());
278278
_contains_map[r->hrm_index()] = CandidateOrigin::Marking;
279279

src/hotspot/share/gc/g1/g1CollectionSetCandidates.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2019, 2026, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -245,8 +245,7 @@ class G1CollectionSetCandidates : public CHeapObj<mtGC> {
245245

246246
// Merge collection set candidates from marking into the current marking candidates
247247
// (which needs to be empty).
248-
void set_candidates_from_marking(G1HeapRegion** candidates,
249-
uint num_candidates);
248+
void set_candidates_from_marking(GrowableArrayCHeap<G1HeapRegion*, mtGC>* selected);
250249
// The most recent length of the list that had been merged last via
251250
// set_candidates_from_marking(). Used for calculating minimum collection set
252251
// regions.

src/hotspot/share/gc/g1/g1CollectionSetChooser.cpp

Lines changed: 0 additions & 296 deletions
This file was deleted.

0 commit comments

Comments
 (0)