RFR: 8138888: Remove ExtendedOopClosure::apply_to_weak_ref_discovered_field
Stefan Johansson
stefan.johansson at oracle.com
Tue Oct 13 13:04:59 UTC 2015
I'm revoking this review for now. Found an issue after additional
testing and fixing it is not trivial.
Stefan
On 2015-10-06 15:41, Stefan Johansson wrote:
> Hi all,
>
> Please review view this patch to address:
> https://bugs.openjdk.java.net/browse/JDK-8138888
>
> Webrev:
> http://cr.openjdk.java.net/~sjohanss/8138888/hotspot.00/
>
> Summary:
> When working on JDK-8138737 I noticed that the handling of the
> reference fields next, discovered and referent is treated differently
> by depending on which closure is being applied. This is controlled by
> ExtendedOopClosure::apply_to_weak_ref_discovered_field. I could not
> find any real good reason for this except that there was a check that
> looked like this:
>
> // Treat discovered as normal oop, if ref is not "active" (next non-NULL)
> if (!oopDesc::is_null(next_oop) && contains(disc_addr)) {
>
> Because of this check (that I and some other folks I've discussed this
> with can't understand) some closures need to override
> apply_to_weak_ref_discovered_field to ensure that the closure is
> applied correctly. By removing this check on next, I believe we can
> get rid of apply_to_weak_ref_discovered_field as well. I've read the
> code and done testing without being able to find a case where this
> won't work.
>
> This change will help when doing JDK-8138737, because the closure in
> that patch need to be applied to all fields.
>
> Testing:
> * JPRT
> * RBT and Aurora runs with JTREG, tonga and BigApps
> * Locally run gc-test-suite with G1
>
> Thanks,
> Stefan
More information about the hotspot-gc-dev
mailing list