JDK-8253234 : Zeroing elimination optimization for allocation followed by Unsafe.copyMemory
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 8
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: generic
  • CPU: generic
  • Submitted: 2020-09-16
  • Updated: 2020-09-25
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
tbdUnresolved
Related Reports
Relates :  
Relates :  
Description
A DESCRIPTION OF THE PROBLEM :
Currently array zeroing elimination optimization only happens when a large array allocation is followed by System.arraycopy().

It would be great to have the same optimization for allocations followed by Unsafe.copyMemory() as well. This is a massive performance improvement for operations like array allocation followed by direct ByteBuffer's bulk get. This can also discourage projects hacking into jdk.internal.misc.Unsafe.allocateUninitializedArray().



Comments
Moving it to dev team for further analysis.
16-09-2020