RFR: 8144584: Change FilterIntoCSClosure to inherit OopClosure
Mikael Gerdin
mikael.gerdin at oracle.com
Fri Dec 4 08:42:45 UTC 2015
Hi Stefan,
On 2015-12-03 16:50, Stefan Johansson wrote:
> Hi,
>
> Please review this change for:
> https://bugs.openjdk.java.net/browse/JDK-8144584
>
> Webrev:
> http://cr.openjdk.java.net/~sjohanss/8138888/8144584/hotspot.00/
Looks good.
/Mikael
>
> Background:
> When iterating objects with oop_iterate() there is a special case for
> InstanceRefKlass, if the closure overrides
> apply_to_weak_ref_discovered_field() to return true, the closure will be
> applied to the discovered field, even if the normal checks prevents it.
> This special treatment is needed in certain situations, but it is not
> obvious if it should be done when iterating the object. Currently only
> G1 closures override apply_to_weak_ref_discovered_field() and many of
> them seem to do it without any reason. My initial plan [1] was to remove
> all usage of this special casing but after discussions I realized it
> would be easier to see the effects if doing this one closure at a time.
>
> Summary:
> FilterIntoCSClosure is yet another closure that inherits
> ExtendedOopClosure, but is only used as an OopClosure. The closure is
> now days only used in one place and the DirtyCardToOopClosure* member is
> never initialized or used so I removed it.
>
> Testing:
> * JPRT
> * RBT
>
> Thanks,
> Stefan
>
> [1] https://bugs.openjdk.java.net/browse/JDK-8138888
More information about the hotspot-gc-dev
mailing list