-
Notifications
You must be signed in to change notification settings - Fork 722
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
Fix null restricted array related issues for value types #20112
Fix null restricted array related issues for value types #20112
Conversation
c469e30
to
516a676
Compare
@hzongaro May I ask you to review this change? Thank you very much! This PR is created as a draft and marked as WIP for now because of all the dependencies. Regarding to the implementation itself, it is ready for review. Since this PR depends on eclipse-omr/omr#7452, it should be review along with eclipse-omr/omr#7452. |
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 think these changes look good - just a few minor comments.
Could you expand on the reason for these changes in the commit comment? May I also ask you to remove the Markdown from the commit comment?
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 - I somehow neglected to review the Value Propagation changes in my first pass through this pull request
bb24a35
to
3af4ff9
Compare
@hzongaro All comments have been addressed in the latest commits, except for the following three that will be addressed in the future PRs due to the complexity. Ready for another review. Thank you! (1) #20112 (comment) Please note that I have rebased this PR to the latest master branch and this PR requires coordinated merge with eclipse-omr/omr#7452. |
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.
Thanks for the updates! Just a few more comments.
d9a0a5c
to
de9f0d5
Compare
Whether or not an array is null-restricted is no longer decided by array component type but by the J9ClassArrayIsNullRestricted flag in array class. Only the nullRestrictedArrayClass of the J9Class has J9ClassArrayIsNullRestricted set. (1) Add getNullRestrictedArrayClassFromComponentClass to retrieve nullRestrictedArrayClass from J9Class (2) Add isArrayNullRestricted to check if an array class is null restricted by checking J9ClassArrayIsNullRestricted. Signed-off-by: Annabelle Huo <[email protected]>
de9f0d5
to
135b856
Compare
@hzongaro All comments are addressed. Ready for another review. Thank you! I rebased the code in order to resolve the merge conflict in |
135b856
to
6782be9
Compare
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.
Thanks for the updates! Just a couple of more minor comments.
6782be9
to
cc811af
Compare
@hzongaro All comments are addressed. Ready for another review. Thank you! |
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.
Looks good. Thanks!
Jenkins test sanity.functional,extended.functional xlinuxval,plinuxval,zlinuxval,alinuxval jdknext depends eclipse-omr/omr#7452 |
Jenkins test sanity.functional,sanity.openjdk xlinuxvalst,plinuxvalst,zlinuxvalst,alinuxvalst jdknext depends eclipse-omr/omr#7452 |
Jenkins test sanity.functional,sanity.openjdk all jdk8,jdk11,jdk17,jdk21 depends eclipse-omr/omr#7452 |
Test_openjdk11_j9_sanity.openjdk_aarch64_linux_Personal: Known issue #13756
Test_openjdk11_j9_sanity.openjdk_x86-64_windows_Personal: Known issue #17743
Test_openjdk17_j9_sanity.openjdk_ppc64_aix_Personal: Known issue: #19962
Test_openjdk17_j9_sanity.openjdk_x86-64_windows_Personal: Known issue #18708
Test_openjdk8_j9_sanity.functional_x86-64_linux_Personal: Known issue: #19224
Valhalla test passes on x86-64 which is what I have tested locally. Valhalla on other platforms (Power, Z, aarch64) fail, which I will take a look at next. I'm not sure about vt_standard tests yet |
I took a quick look at the sanity.functional and sanity.openjdk "vt-standard" testing. It looks like those tests have seen many failures in recent runs. For instance, an aarch64 Linux sanity.functional vt-standard PR test run from earlier this month yielded 55 failures. We'll need to do further investigation, but it seems unlikely that this pull request is responsible for the failures. These failures will not hold back merging this pull request.
|
Two main tests fail on Power, Z, and Aarch64: I looked at the failure in It failed because
|
Thanks, @a7ehuo! Should the relevant tests still be disabled and an issue opened, or do you plan to try to fix this problem in this pull request? |
I plan to disable the related two tests (ValueTypeArrayTestsJIT, ValueTypeSystemArraycopyTests) for now and open new PRs when ready. There are already issues opened on them. I think I will reuse them for future submission. I will make a note in these two issues that this PR doesn't fix them on all hardware. I'll run some Jenkins Valhalla tests on all platforms before pushing another commit |
(1) Add recognized methods from jdk/internal/value/ValueClass and jdk/internal/value/NullRestrictedCheckedType (2) Add VP fixed class constraint if ValueClass.newArrayInstance creates null restricted array using NullRestrictedCheckedType (3) Rename isArrayCompTypePrimitiveValueType to isArrayNullRestricted to reflect the updated logic Update isArrayNullRestricted on how to determine whether or not an array is a null restricted array (4) Disable transformation based on type hint which is no longer sufficient enough to decide whether or not the array is null restricted or not (5) If flattenable arrays are enabled, do not create fixed class constraint for parm array class based on signature since both nullable and null restricted arrays share the same signature Related: eclipse-openj9#19913, eclipse-openj9#19914, eclipse-openj9#19708 Signed-off-by: Annabelle Huo <[email protected]>
cc811af
to
f2c432a
Compare
@hzongaro I reverted |
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.
Looks good. Thanks! I'll rerun testing, in order to verify that the playlist.xml
was updated correctly, and also so I can ensure the coordinated merge that will be required can proceed.
Jenkins test sanity.functional,extended.functional xlinuxval,plinuxval,zlinuxval,alinuxval jdknext depends eclipse-omr/omr#7452 |
Jenkins test sanity.functional,sanity.openjdk all jdk8,jdk11,jdk17,jdk21 depends eclipse-omr/omr#7452 |
Jenkins test sanity.functional,sanity.openjdk xmac jdk11 depends eclipse-omr/omr#7452 |
Checked three failed tests and all known issues (details as below). Waiting for openjdk11_j9_sanity.functional_x86-64_mac to complete Test_openjdk21_j9_sanity.openjdk_x86-64_mac: Known issue: #19987
Test_openjdk8_j9_sanity.functional_x86-64_linux: Known issue: #18599
Test_openjdk8_j9_sanity.openjdk_s390x_linux: Known issue: #14948 (comment)
|
Failures were due to known issues. OMR pull request eclipse-omr/omr#7452 that this change depends upon has been merged and promoted. Merging. |
(1) Add utility methods for null restricted arrays
(2) Fix null restricted array related issues
jdk/internal/value/ValueClass.newArrayInstance
ValueClass.newArrayInstance
creates null restricted arrayisArrayCompTypePrimitiveValueType
toisArrayNullRestricted
to reflect the updated logicisArrayNullRestricted
on how to determine whether or not an array is a null restricted arrayDepends on
Related: #19913, #19914, #19708