RFR: 8215985: ZGC: Simplify reference processing in light of JDK-8175797
Erik Österlund
erik.osterlund at oracle.com
Wed Jan 2 12:09:57 UTC 2019
Hi Kim,
Looks good to me.
Thanks,
/Erik
On 2019-01-02 08:31, Kim Barrett wrote:
> Please review this change to ZGC reference processing to take
> advantage of the changes made by JDK-8175797, which made
> Reference.enqueue clear the referent and made Reference.enqueue
> unsupported by FinalReference.
>
> As a result of JDK-8175797, the special treatment of the 'next' field
> by the GC is no longer needed for most reference type; only
> FinalReference needs special handling of that field. This means
> (except for FinalReference, e.g. REF_FINAL) the 'next' field no longer
> needs to be examined by discovery, and does not need to be self-looped
> by notification (eliminating a CAS to deal with possible concurrent
> enqueue).
>
> In discover_reference, the order of tests was changed because the
> inactive final reference case should be relatively rare. Doing the
> "strongly alive or null" test first should be a better order, with the
> remaining tests being for somewhat uncommon special cases that would
> pass that discoverability test.
>
> CR:
> https://bugs.openjdk.java.net/browse/JDK-8215985
>
> Webrev:
> http://cr.openjdk.java.net/~kbarrett/8215985/open.00/
>
> Testing:
> mach5 tier{1-4}, hs-tier{5-8}-gc.
>
>
More information about the hotspot-gc-dev
mailing list