Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8215985

ZGC: Simplify reference processing in light of JDK-8175797

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 13
    • None
    • hotspot
    • gc
    • b03
    • generic
    • generic

      JDK-8175797 changed Reference.enqueue to ensure the reference object is cleared before enqueuing it. This eliminates some states and state transitions, allowing some simplification of reference processing.

      In particular, the case of a discovered reference which is later found to have been enqueued but still has a non-null referent is no longer possible.

      For the most part, the Reference.next field no longer needs any special treatment, and can be handled like any normal object field. It still requires some special handling in support of FinalReferences though; a non-null next is the mechanism used to indicate a FinalReference is no longer active, since the reference object is not cleared.

      (JDK-8203028 addressed these changes for other collectors, but did not address ZGC. This RFE is specifically about ZGC.)

            kbarrett Kim Barrett
            kbarrett Kim Barrett
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: