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

G1: remove unnecessary make_referent_alive in precleaning phase

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 18
    • 18
    • hotspot
    • gc
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: