Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8221766 Load-reference barriers for Shenandoah
  3. JDK-8225516

Release Note: Load reference barriers for Shenandoah

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: P4 P4
    • 13
    • 13
    • hotspot
    • gc

      Shenandoah used to employ the weak to-space invariant: allow reads to be done from the collection set while it is being evacuated, and evacuate objects on writes to them. This forced the implementation to have simple read barriers before every read accesses (including primitive ones), and complicated write barriers before every write access (including primitive ones), plus handling the cases where both copies of the objects are exposed (for example, in acmp). With this change, Shenandoah rewires the barriers to employ stronger to-space invariant: never expose objects in the collection set, evacuating them eagerly on reference load. Implementation rewires that used to be the write barrier handling code to every reference load, and removes other barriers (read, acmp, storeval barriers).

      The change makes simpler barrier interface, provides more opportunities for performance optimizations, reduces the maintenance burden. Even though Shenandoah makes more complicated read barriers with this change, the incidence of those barriers is lower, because there are no barriers on writes anymore, and only reference loads need to be handled. This makes the change performance neutral or performance-positive on many workloads, even with simpler optimization code.

            shade Aleksey Shipilev
            shade Aleksey Shipilev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: