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

G1 doesn't need pre write barrier for stores from newly allocated objects

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Withdrawn
    • Icon: P4 P4
    • tbd
    • 8, 11, 17, 21, 24
    • hotspot
    • gc
    • generic
    • generic

      The pre-write barrier of G1 is used to capture the object disconnected from the marking graph which could be unmarked aka *white* and stored into *black* objects then break tri-color invariance. But references in new allocated objects are created in object initialization after marking start and never could be white. So we don't need pre-write barrier for stores from new allocated objects. The same mechanism is also used for barrier eliminantion in GenZGC.

            lmao Liang Mao
            lmao Liang Mao
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: