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

Roman Kennke rkennke at redhat.com
Mon Nov 5 19:59:06 UTC 2018

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?


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20181105/a48d60a9/signature.asc>

More information about the hotspot-compiler-dev mailing list