-
Notifications
You must be signed in to change notification settings - Fork 729
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x86: Increase inline reference arraycopy threshold #20525
Merged
0xdaryl
merged 1 commit into
eclipse-openj9:master
from
a7ehuo:system-arraycopy-perf-27-threshold-64-128
Nov 13, 2024
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remember being confused by this code when it was first delivered, and with the passage of time I am once again confused.
The documentation for the
arraycopyRepMovsReferenceArrayThreshold
option says that only 32, 64, or 128 bytes are supported (32 is the default). This means that thisif
branch should always be taken because the condition on L1905 will always be true. This also means thatrepMovsThresholdBytes
will always be overwritten from what it was set to on L1902.Is the purpose of the code on L1902 then just in case someone provided an unsupported value for
arraycopyRepMovsReferenceArrayThreshold
? If so, I think the code could be written a bit differently to convey that. Specifically, move L1902 as anelse
to thisif
and add a comment saying that this path is for when an invalid reference array threshold is provided.Or am I completely wrong in understanding this logic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, maybe I have to view this from the perspective of your new OMR PR 7534 alongside this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry my bad, I should have mentioned that this PR should be reviewed together with OMR PR #7534.
Without OMR PR #7534, this PR won't break the build, but it does depend on OMR PR #7534 to get the reference arraycopy threshold properly increased to 64/128.
In OMR PR #7534, the default values for all
arraycopyRepMovs*ArrayThreshold
s are reset to 0 in OMROptions.hpp.My intended logic is
(1) CG should set the threshold to the proper value: 64 or 128
(2) If someone sets a value in -Xjit options, the threshold will get updated only if the value is valid