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

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

    XMLWordPrintable

Details

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

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated: