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

Simplify reference processing in light of JDK-8175797

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 11
    • Component/s: hotspot
    • Subcomponent:
      gc
    • Resolved In Build:
      b16
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

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

        In particular, for reference processing when discovery is not atomic, 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. This means that much of the difference between pp2_work and pp2_work_concurrent_discovery is no longer required, and those functions can be mostly merged.

        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 referent is not cleared.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  kbarrett Kim Barrett
                  Reporter:
                  kbarrett Kim Barrett
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: