Skip to content

Guarantee new array will be zero initialized in transformArrayCloneCall (0.48) - #213

Merged
hzongaro merged 1 commit into
eclipse-openj9:v0.48.0-releasefrom
maggietuttle:zeroNewArray
Oct 7, 2024
Merged

Guarantee new array will be zero initialized in transformArrayCloneCall (0.48)#213
hzongaro merged 1 commit into
eclipse-openj9:v0.48.0-releasefrom
maggietuttle:zeroNewArray

Conversation

@maggietuttle

Copy link
Copy Markdown
Contributor

Guarantee that newarrays generated from transformations of array clone calls will always be zero initialized, ensuring array allocation is done inline, whether TR_disableSkipZeroInitInVP is enabled or not.

While investigation and development into a fix for a bug caused by corruption of a TLH pointer forcing out of line array allocation when we skip zero initialization is ongoing, this PR will provide a temporary performance boost at the (rare and minor) expense of occasional zero initialization of arrays that don't need to be zero initialized.

This PR ports omr #7481 to the 0.48 release.

Guarantee that new array generated from transformation of array
clone call will always be zero initialized, ensuring array allocation
is done inline, whether TR_disableSkipZeroInitInVP is enabled or not

Signed-off-by: Dylan Tuttle <jdylantuttle@gmail.com>
@maggietuttle

Copy link
Copy Markdown
Contributor Author

@hzongaro @pshipton Another quick change for 0.48!

@pshipton

pshipton commented Oct 7, 2024

Copy link
Copy Markdown
Member

What does this fix pls?

@maggietuttle

Copy link
Copy Markdown
Contributor Author

It fixes a performance deficit relative to HotSpot when cloning arrays. We have a bug that causes allocation of a newarray generated out of a transformation from the array clone call to go out of line when the newarray is non-zero initialized. The fix for that bug is currently being investigated, so in the meantime, @vijaysun-omr thought we should get this temporary fix in to speed things up by forcing zero initialization.

@hzongaro hzongaro self-assigned this Oct 7, 2024
@hzongaro
hzongaro merged commit 61b10e6 into eclipse-openj9:v0.48.0-release Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants