G1: remove unnecessary make_referent_alive in precleaning phase

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 18
    • Affects Version/s: 18
    • Component/s: hotspot
    • gc
    • b21

      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.

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

              Created:
              Updated:
              Resolved: