RFR (S): 8242036: G1 HeapRegionRemSet::_n_coarse_entries could be a bool

Leo Korinth leo.korinth at oracle.com
Thu Jul 23 13:14:57 UTC 2020



On 23/07/2020 14:42, Thomas Schatzl wrote:
> 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

Looks good to me as well, thanks for fixing this, I will sponsor this for you.

Thanks,
Leo



More information about the hotspot-gc-dev mailing list