RFR (S): 8242036: G1 HeapRegionRemSet::_n_coarse_entries could be a bool
Thomas Schatzl
thomas.schatzl at oracle.com
Thu Jul 23 12:42:16 UTC 2020
Hi Albert,
On 23.07.20 14:29, Albert Yang wrote:
> I misunderstood the original request from the internal discussion.
>
> The variable is marked `volatile`, and access to it uses `Atomic::load/store`, or `Atomic::load_acquire/release_store` only when memory ordering is needed.
>
> https://bugs.openjdk.java.net/browse/JDK-8242036
>
> the complete patch:
>
> http://cr.openjdk.java.net/~lkorinth/albert/8242036/2/
heapRegionRemSet.cpp:
273 assert(_coarse_map.at(max_hrm_index) == false, "No coarse entries");
Never compare to false/true directly but use ! here.
276 // concurrent reader will ever see _has_coarse_entries == true
s/==/is (or "is set" or some similar text)
Looks good otherwise. I do not need to see a re-review for these changes.
Thanks,
Thomas
More information about the hotspot-gc-dev
mailing list