RFR: 8215985: ZGC: Simplify reference processing in light of JDK-8175797

Per Liden per.liden at oracle.com
Mon Jan 7 09:28:23 UTC 2019


On 1/2/19 8:31 AM, 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/

Looks good.

After this change I think I'd like to do some (mostly cosmetic) 
adjustments in this area, but I'll follow up with a separate RFE for 
this later.

cheers,
Per

> 
> Testing:
> mach5 tier{1-4}, hs-tier{5-8}-gc.
> 
> 


More information about the hotspot-gc-dev mailing list