JDK-8222859 : Improve object arraycopy to do single-loop
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 8-shenandoah,11-shenandoah,12,13
  • Priority: P4
  • Status: Resolved
  • Resolution: Withdrawn
  • OS: generic
  • CPU: generic
  • Submitted: 2019-04-23
  • Updated: 2019-09-16
  • Resolved: 2019-09-16
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.
Other
tbdResolved
Related Reports
Blocks :  
Relates :  
Relates :  
Description
Currently, object arraycopies requires up to 3 scans of the array:
1. Pre-barrier scans the dst array for SATB
2. Actual copy (using blit transfer)
3. Post-barrier scans the dst array again to update any from-space refs to to-space

This can be folded into a single loop which does the above per-element, and ensures to-space invariant before actually storing the object into the dst array. The latter would help other code that currently needs to deal with (temporary) from-space refs in arrays. See JDK-8222766.
Comments
JDK-8231086 implements a better arraycopy-barrier-scheme than the one proposed here, which provides similar strong invariant.
16-09-2019