RFR (S): 8210557: G1 next bitmap verification at the end of concurrent mark sometimes fails

Kim Barrett kim.barrett at oracle.com
Thu Sep 20 20:51:33 UTC 2018


> On Sep 20, 2018, at 10:31 AM, Thomas Schatzl <thomas.schatzl at oracle.com> wrote:
> 
> Hi,
> 
>  can I have reviews for this smal change that removes an unnecessary
> and actually superfluous assert that can sometimes fail?
> 
> So if G1 concurrent mark gets aborted by a full gc, it intends to check
> whether the next mark bitmap for the next concurrent cycle is
> completely cleared.
> 
> Unfortunately, G1 full gc uses the next bitmap for its own marking, so
> depending on when this thread gets scheduled, it may errorneously
> detect that the next mark bitmap contains marks (well, from the first
> phase of full gc :)).
> 
> This bitmap-clear check is actually unnecessary: at the end of full gc
> the next bitmap is already checked for being completely empty (in
> G1CollectedHeap:1086).
> 
> So instead of trying to change scheduling of that verification (to e.g.
> run outside GC), I opted to remove this verification (and associated
> code) completely.
> 
> CR:
> https://bugs.openjdk.java.net/browse/JDK-8210557
> Webrev:
> http://cr.openjdk.java.net/~tschatzl/8210557/webrev/
> Testing:
> passing hs-tier1-5,jdk-tier1-3 with -XX:+G1VerifyBitmaps; however since
> this is just removal of verification code there is extremely low risk
> of introducing a bug. :)
> 
> Thanks,
>  Thomas

Looks good.




More information about the hotspot-gc-dev mailing list