Skip to content

Commit 5ede5b4

Browse files
author
Thomas Schatzl
committed
8364650: G1: Use InvalidCSetIndex instead of UINT_MAX for "invalid" sentinel value of young_index_in_cset
Reviewed-by: ayang, iwalulya
1 parent 5febc4e commit 5ede5b4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ G1HeapRegion::G1HeapRegion(uint hrm_index,
245245
_parsable_bottom(nullptr),
246246
_garbage_bytes(0),
247247
_incoming_refs(0),
248-
_young_index_in_cset(-1),
248+
_young_index_in_cset(InvalidCSetIndex),
249249
_surv_rate_group(nullptr),
250250
_age_index(G1SurvRateGroup::InvalidAgeIndex),
251251
_node_index(G1NUMA::UnknownNodeIndex),

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -496,10 +496,10 @@ class G1HeapRegion : public CHeapObj<mtGC> {
496496
void set_index_in_opt_cset(uint index) { _index_in_opt_cset = index; }
497497
void clear_index_in_opt_cset() { _index_in_opt_cset = InvalidCSetIndex; }
498498

499-
uint young_index_in_cset() const { return _young_index_in_cset; }
499+
uint young_index_in_cset() const { return _young_index_in_cset; }
500500
void clear_young_index_in_cset() { _young_index_in_cset = 0; }
501501
void set_young_index_in_cset(uint index) {
502-
assert(index != UINT_MAX, "just checking");
502+
assert(index != InvalidCSetIndex, "just checking");
503503
assert(index != 0, "just checking");
504504
assert(is_young(), "pre-condition");
505505
_young_index_in_cset = index;

0 commit comments

Comments
 (0)