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
-------------- 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-gc-dev/attachments/20181105/a48d60a9/signature.asc>