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

G1: remove unnecessary make_referent_alive in precleaning phase

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 18
    • 18
    • 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.

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

              Created:
              Updated:
              Resolved: