RFR: 8072817: CardTableExtension kind() should be BarrierSet::CardTableExtension
Kim Barrett
kim.barrett at oracle.com
Wed Aug 19 17:42:04 UTC 2015
Please review this change to finally properly integrate the
BarrierSet::CardTableExtension barrier set kind. This has been
deferred for a long time; there was, until recently, a comment in
CardTableExtension that having kind() return
BarrierSet::CardTableExtension was "too risky for the 4/10/02
putback".
Much of the work involved in supporting the CardTableExtension tag had
been done long ago. The remaining work involved actually hooking it
up. The key missing step was to give CardTableModRefBSForCTRS its own
tag (to distinguish from CardTableExtension) and switch to using that
tag where needed. The needed tag (BarrierSet::CardTableForRS) was
defined in the fix for JDK-8069016. This change makes use of it.
This involved the following steps:
1. Most occurrences of BarrierSet::CardTableModRef are now
BarrierSet::CardTableForRS. Occurrences of BarrierSet::CardTableForRS
and BarrierSet::CardTableExtension are now nearly always paired.
Exceptions are in the constructors of the corresponding classes and in
the associated barrier_set_cast support.
2. The tests for kind() == BarrierSet::CardTableModRef that were
controlling the devirtualization of write_ref_field_pre,
write_ref_field, and write_region now test for either
BarrierSet::CardTableForRS or BarrierSet::CardTableExtension. The
FakeRttiSupport class was extended to improve the new test.
3. The remaining small number of tests for kind() ==
BarrierSet::CardTableModRef are now tests for
is_a(BarrierSet::CardTableModRef). These are places where we really do
allow a CardTableModRefBS and don't care which subclass; all of these
involve access to the card table. This now includes G1 barrier sets in
a couple of places where they were previously inappropriately or
unnecessarily excluded.
4. The CardTableModRefBSForCTRS class now specifies its kind tag be
BarrierSet::CardTableForRS. The CardTableExtension class now specifies
its kind tag be BarrierSet::CardTableExtension. The extra
FakeRttiSupport constructor that existed to support the old kludge for
those classes has been removed.
Also removed unused CollectorPolicy::barrier_set_name.
CR:
https://bugs.openjdk.java.net/browse/JDK-8072817
Webrev:
http://cr.openjdk.java.net/~kbarrett/8072817/webrev.00/
Testing:
jprt
aurora ad hoc GC/Runtime Nightly, quicktests, tonga, jtreg
More information about the hotspot-gc-dev
mailing list