JDK-8064473 : Improved handling of age during object copy in G1
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2014-11-10
  • Updated: 2018-02-16
  • Resolved: 2014-11-17
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 8 JDK 9
8u60Fixed 9 b42Fixed
Related Reports
Duplicate :  
Relates :  
Description
The current G1 object copy implementation reads age multiple times from the object being promoted/copied which is a fairly expensive operation as it is reading a volatile and requires using a mask to access the age bits.

To avoid this the markOop will read before the check if the object has already been copied and then the age is read once and reused when updating the age of the object if the thread ends up copying it.