Skip to content

Commit

Permalink
8274738: ZGC: Use relaxed atomic load when reading bits in the live map
Browse files Browse the repository at this point in the history
Reviewed-by: stefank, eosterlund
  • Loading branch information
pliden committed Oct 6, 2021
1 parent 8a4d2b4 commit 2faced0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/hotspot/share/gc/z/zLiveMap.inline.hpp
Expand Up @@ -98,9 +98,9 @@ inline BitMap::idx_t ZLiveMap::index_to_segment(BitMap::idx_t index) const {

inline bool ZLiveMap::get(size_t index) const {
BitMap::idx_t segment = index_to_segment(index);
return is_marked() && // Page is marked
is_segment_live(segment) && // Segment is marked
_bitmap.at(index); // Object is marked
return is_marked() && // Page is marked
is_segment_live(segment) && // Segment is marked
_bitmap.par_at(index, memory_order_relaxed); // Object is marked
}

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

1 comment on commit 2faced0

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.