RFR: JDK-8213384: Move G1/C2 barrier verification into G1BarrierSetC2
vladimir.kozlov at oracle.com
Mon Nov 5 22:39:32 UTC 2018
Compiler change looks fine.
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
> - 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.
> Can I please get a review?
More information about the hotspot-gc-dev