Skip to content
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

8268389: [lworld] Tests must be update after core reflection changes for the L/Q model #437

Closed
wants to merge 2 commits into from

Conversation

fparain
Copy link
Collaborator

@fparain fparain commented Jun 8, 2021

Fix all but one test to pass with the new L/Q model and the new core reflection.
The failing test, TestIntrinsics.java might be a real VM bug and not a test bug, but it is C2 related.

Fred


Progress

  • Change must not contain extraneous whitespace

Issue

  • JDK-8268389: [lworld] Tests must be update after core reflection changes for the L/Q model

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/valhalla pull/437/head:pull/437
$ git checkout pull/437

Update a local copy of the PR:
$ git checkout pull/437
$ git pull https://git.openjdk.java.net/valhalla pull/437/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 437

View PR using the GUI difftool:
$ git pr show -t 437

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/valhalla/pull/437.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Jun 8, 2021

👋 Welcome back fparain! A progress list of the required criteria for merging this PR into lqagain will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Jun 8, 2021

@fparain This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8268389: [lworld] Tests must be update after core reflection changes for the L/Q model

Reviewed-by: hseigel

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been no new commits pushed to the lqagain branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the lqagain branch, type /integrate in a new comment.

@mlbridge
Copy link

mlbridge bot commented Jun 8, 2021

Webrevs

Asserts.assertFalse(test1(MyValue1.class, MyValue1.ref.class), "test1_5 failed");
Asserts.assertTrue(test1(MyValue1.class, MyValue1.class), "test1_2 failed");
Asserts.assertTrue(test1(MyValue1.class.asValueType(), MyValue1.class.asValueType()), "test1_3 failed");
Asserts.assertTrue(test1(MyValue1.class.asValueType(), MyValue1.class.asValueType()), "test1_4 failed");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should the first MyValue1.class.asValueType() in line 75 be MyValue1.class (to match MyValue1.ref.class) ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MyValue1.class.asValueType() and MyValue1.class are different (secondary mirror vs primary mirror), so changing from MyValue1.class.asValueType() to MyValue1.class would make this line to fail.
However, this line has not been fixed properly (it accidentally duplicates line 74).
Now, I think the right way to fix it is:

Asserts.assertFalse(test1(MyValue1.class, MyValue.class.asValueType()), "test1_4 failed");

The test has to be inverted from assertTrue to assertFalse to verify that the two mirrors are distinct.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact MyValue1.class == ldc QMyValue1; and MyValue1.class and MyValue1.class.asValueType() are the secondary mirror. MyValue1.ref.class is the primary mirror.

AFAIU, these tests fail in -Xcomp mode (pass in -Xint mode) as it's awaiting for the JIT phase 2 support (JDK-8267932) which is blocked by the core reflection support.

Would disabling -Xcomp run from these tests be a better temporay fix until JDK-8267932?

Copy link
Member

@hseigel hseigel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look good!
Thanks, Harold

@fparain
Copy link
Collaborator Author

fparain commented Jun 8, 2021

Harold,

Thank you for the review and for spotting the bad fix.

Fred

@fparain
Copy link
Collaborator Author

fparain commented Jun 8, 2021

/integrate

@openjdk openjdk bot closed this Jun 8, 2021
@openjdk openjdk bot added integrated and removed ready rfr labels Jun 8, 2021
@openjdk
Copy link

openjdk bot commented Jun 8, 2021

@fparain Pushed as commit 8807adf.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@mlbridge
Copy link

mlbridge bot commented Jun 8, 2021

Mailing list message from Frederic Parain on valhalla-dev:

On Jun 8, 2021, at 1:15 PM, Mandy Chung <mchung at openjdk.java.net> wrote:

On Tue, 8 Jun 2021 14:33:51 GMT, Frederic Parain <fparain at openjdk.org> wrote:

test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestIntrinsics.java line 75:

73: Asserts.assertTrue(test1(MyValue1.class, MyValue1.class), "test1_2 failed");
74: Asserts.assertTrue(test1(MyValue1.class.asValueType(), MyValue1.class.asValueType()), "test1_3 failed");
75: Asserts.assertTrue(test1(MyValue1.class.asValueType(), MyValue1.class.asValueType()), "test1_4 failed");

should the first MyValue1.class.asValueType() in line 75 be MyValue1.class (to match MyValue1.ref.class) ?

MyValue1.class.asValueType() and MyValue1.class are different (secondary mirror vs primary mirror), so changing from MyValue1.class.asValueType() to MyValue1.class would make this line to fail.
However, this line has not been fixed properly (it accidentally duplicates line 74).
Now, I think the right way to fix it is:

Asserts.assertFalse(test1(MyValue1.class, MyValue.class.asValueType()), "test1_4 failed");

The test has to be inverted from assertTrue to assertFalse to verify that the two mirrors are distinct.

In fact `MyValue1.class` == `ldc QMyValue1;` and `MyValue1.class` and `MyValue1.class.asValueType()` are the secondary mirror. `MyValue1.ref.class` is the primary mirror.

Mandy,

Thank you for the clarification. Many of the changes are in fact incorrect(invalid changes from x.ref.class to x.class).
I was confused because getClass() always returns the primary mirror and .class returns either the primary or the secondary (I should have known that because I reviewed your code implementing this).
I?ll back out this changeset and re-do it correctly.

Fred

1 similar comment
@mlbridge
Copy link

mlbridge bot commented Jun 8, 2021

Mailing list message from Frederic Parain on valhalla-dev:

On Jun 8, 2021, at 1:15 PM, Mandy Chung <mchung at openjdk.java.net> wrote:

On Tue, 8 Jun 2021 14:33:51 GMT, Frederic Parain <fparain at openjdk.org> wrote:

test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestIntrinsics.java line 75:

73: Asserts.assertTrue(test1(MyValue1.class, MyValue1.class), "test1_2 failed");
74: Asserts.assertTrue(test1(MyValue1.class.asValueType(), MyValue1.class.asValueType()), "test1_3 failed");
75: Asserts.assertTrue(test1(MyValue1.class.asValueType(), MyValue1.class.asValueType()), "test1_4 failed");

should the first MyValue1.class.asValueType() in line 75 be MyValue1.class (to match MyValue1.ref.class) ?

MyValue1.class.asValueType() and MyValue1.class are different (secondary mirror vs primary mirror), so changing from MyValue1.class.asValueType() to MyValue1.class would make this line to fail.
However, this line has not been fixed properly (it accidentally duplicates line 74).
Now, I think the right way to fix it is:

Asserts.assertFalse(test1(MyValue1.class, MyValue.class.asValueType()), "test1_4 failed");

The test has to be inverted from assertTrue to assertFalse to verify that the two mirrors are distinct.

In fact `MyValue1.class` == `ldc QMyValue1;` and `MyValue1.class` and `MyValue1.class.asValueType()` are the secondary mirror. `MyValue1.ref.class` is the primary mirror.

Mandy,

Thank you for the clarification. Many of the changes are in fact incorrect(invalid changes from x.ref.class to x.class).
I was confused because getClass() always returns the primary mirror and .class returns either the primary or the secondary (I should have known that because I reviewed your code implementing this).
I?ll back out this changeset and re-do it correctly.

Fred

@TobiHartmann
Copy link
Member

The test will be fixed by JDK-8267932.

@fparain fparain deleted the lq_tests branch July 20, 2021 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

4 participants