Skip to content

Commit 2faced0

Browse files
committedOct 6, 2021
8274738: ZGC: Use relaxed atomic load when reading bits in the live map
Reviewed-by: stefank, eosterlund
1 parent 8a4d2b4 commit 2faced0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎src/hotspot/share/gc/z/zLiveMap.inline.hpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ inline BitMap::idx_t ZLiveMap::index_to_segment(BitMap::idx_t index) const {
9898

9999
inline bool ZLiveMap::get(size_t index) const {
100100
BitMap::idx_t segment = index_to_segment(index);
101-
return is_marked() && // Page is marked
102-
is_segment_live(segment) && // Segment is marked
103-
_bitmap.at(index); // Object is marked
101+
return is_marked() && // Page is marked
102+
is_segment_live(segment) && // Segment is marked
103+
_bitmap.par_at(index, memory_order_relaxed); // Object is marked
104104
}
105105

106106
inline bool ZLiveMap::set(size_t index, bool finalizable, bool& inc_live) {

1 commit comments

Comments
 (1)

openjdk-notifier[bot] commented on Oct 6, 2021

@openjdk-notifier[bot]
Please sign in to comment.