RFR: 8241920: G1: Lazily initialize OtherRegionsTable::_coarse_map

Thomas Schatzl thomas.schatzl at oracle.com
Wed Apr 1 17:06:14 UTC 2020


Hi,

On 01.04.20 18:46, Claes Redestad wrote:
> Hi,
> 
> initializing OtherRegionsTable::_coarse_map lazily allows for a small
> startup and footprint improvement, with no measurable cost to GC
> collection times.
> 
> Webrev: http://cr.openjdk.java.net/~redestad/8241920/open.00/
> Bug:    https://bugs.openjdk.java.net/browse/JDK-8241920
> 
> Thanks!

   at first glance, I think the code misses a potential racy read of the 
bitmap data, i.e. the pointer to the bitmap data already published in 
delete_region_data() after the assignment (which is under a mutex) but a 
concurrent thread could see the still not properly initialized bitmap 
data values as they are being cleared?

Thanks,
   Thomas




More information about the hotspot-gc-dev mailing list