JDK-8225516 : Release Note: Load reference barriers for Shenandoah
  • Type: Sub-task
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 13
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2019-06-10
  • Updated: 2019-07-01
  • Resolved: 2019-06-10
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 13
13Fixed
Description
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.