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

G1: remove unnecessary make_referent_alive in precleaning phase

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 18
    • Fix Version/s: 18
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
      gc
    • Resolved In Build:
      b21

      Description

      After concurrent-marking, G1 will walk through the discovered list (DL) and drop references whose referents are null or live, because those references should not be processed. If a referent is live, `make_referent_alive` is called so that everything reachable from that referent should be kept live as well.

      However, `make_referent_alive` would always be a no-op because concurrent-marking is done, and mutators calling `Reference.get()` only enqueues a pointer, *not* updating the marking status. (Those enqueued pointers are processed later in the Remark phase.)

      The attachment contains a contrived example to stress G1 precleaning, ~3 million weak refs on the DL.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ayang Albert Yang
              Reporter:
              ayang Albert Yang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: