RFR: JDK-8213384: Move G1/C2 barrier verification into G1BarrierSetC2

Vladimir Kozlov vladimir.kozlov at oracle.com
Mon Nov 5 22:39:32 UTC 2018


Compiler change looks fine.

Thanks,
Vladimir

On 11/5/18 11:59 AM, Roman Kennke wrote:
> 
> Compile::verify_barriers() exists and is implemented only to verify G1's
> SATB barriers. Meanwhile, we have BarrierSetC2::verify_gc_barriers() API
> that should be used instead.
> 
> 
> This change proposes to remove Compile::verify_barriers() and replace
> its uses by BarrierSetC2::verify_gc_barriers(). In order to do so, I
> changed verify_gc_barriers() to take an enum (instead of bool) that
> describes the current phase, this will scale better in future should we
> ever want more verification points, and it reads better. Plus we now
> pass a Compile* to get the context.
> 
> The new code in G1BarrierSetC2::verify_gc_barriers() is basically a 1:1
> copy of the previous Compile::verify_barriers().
> 
> I tried to make the changes in ZBarrierSetC2 equivalent to what it did
> before:
> - Don't verify in new phase BeforeCodeGen (not sure if needed/wanted)
> - Redirect virtual verify_gc_barriers() to existing (now private)
> verify_gc_barriers(), that is also used by ZBarrierSetC2 itself and
> doesn't have a Compile* there.
> 
> Bug:
> https://bugs.openjdk.java.net/browse/JDK-8213384
> Webrev:
> http://cr.openjdk.java.net/~rkennke/JDK-8213384/webrev.01/
> 
> Can I please get a review?
> 
> Thanks,
> Roman
> 



More information about the hotspot-gc-dev mailing list