Skip to content
This repository has been archived by the owner on Sep 2, 2022. It is now read-only.
/ jdk16 Public archive

8258134: assert(size == calc_size) failed: incorrect size calculation on x86_32 with AVX512 machines #21

Closed
wants to merge 1 commit into from

Conversation

DamonFool
Copy link
Member

@DamonFool DamonFool commented Dec 15, 2020

Hi all,

Two vector api tests crashed on x86_32 with AVX512 machines due to this assert [1].
The reason is that 'calc_size' is incorrect.

But there is no need to calculate 'calc_size' manually at all since the result [2] is actually never used by the VM.
Also, it is really hard to maintain the calculation logic for various hardwares and configurations.
And it may be easily broken again in the future with more and more complicated instructions & configurations.

So it would be better to remove the calculation and the assert, which is safe and already done for x86_64 [3].
The fix follows what is done for x86_64.
And it also makes vec_stack_to_stack_helper, vec_mov_helper and vec_spill_helper return void according to @neliasso 's comments [4].

Thanks.
Best regards,
Jie

[1] https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/x86/x86_32.ad#L1016
[2] https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/x86/x86_32.ad#L1059
[3] https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/x86/x86_64.ad#L1042
[4] openjdk/jdk#1753 (comment)


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8258134: assert(size == calc_size) failed: incorrect size calculation on x86_32 with AVX512 machines

Reviewers

Download

$ git fetch https://git.openjdk.java.net/jdk16 pull/21/head:pull/21
$ git checkout pull/21

@DamonFool
Copy link
Member Author

/issue add JDK-8258134
/test
/label add hotspot-compiler
/cc hotspot-compiler

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 15, 2020

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

@openjdk openjdk bot added the rfr Pull request is ready for review label Dec 15, 2020
@openjdk
Copy link

openjdk bot commented Dec 15, 2020

@DamonFool This issue is referenced in the PR title - it will now be updated.

@openjdk openjdk bot added the hotspot-compiler hotspot-compiler-dev@openjdk.java.net label Dec 15, 2020
@openjdk
Copy link

openjdk bot commented Dec 15, 2020

@DamonFool
The hotspot-compiler label was successfully added.

@openjdk
Copy link

openjdk bot commented Dec 15, 2020

@DamonFool The hotspot-compiler label was already applied.

@mlbridge
Copy link

mlbridge bot commented Dec 15, 2020

Webrevs

@DamonFool
Copy link
Member Author

/test

@DamonFool
Copy link
Member Author

Testing:

  • tier1~tier3 on Linux/x86_{32, 64}, no regression

Copy link

@vnkozlov vnkozlov left a comment

Choose a reason for hiding this comment

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

Good.

@openjdk
Copy link

openjdk bot commented Dec 15, 2020

@DamonFool 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:

8258134: assert(size == calc_size) failed: incorrect size calculation on x86_32 with AVX512 machines

Reviewed-by: kvn, thartmann

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 27 new commits pushed to the master branch:

  • 38593a4: 8257974: Regression 21% in DaCapo-lusearch-large after JDK-8236926
  • 7afb01d: 8258373: Update the text handling in the JPasswordField
  • cbc3fee: 8258259: Unicode linebreak matching behavior is incorrect; backout JDK-8235812
  • 7320e05: 8258647: TestCharVect2 is very slow
  • 9fdfc6d: 8225072: Add LuxTrust certificate that is expiring in March 2021 to list of allowed but expired certs
  • 30ca0a5: 8247994: Localize javadoc search
  • 47c180d: 8258515: javac should issue an error if an annotation is nested in a local class or interface
  • cb5a6b1: 8258225: compiler/c2/cr6340864/TestIntVect.java runs faster in interpreter
  • 61cbf0f: 8258293: tools/jpackage/share/RuntimePackageTest.java#id0 with RuntimePackageTest.testUsrInstallDir2
  • 7aac4dc: 8257621: JFR StringPool misses cached items across consecutive recordings
  • ... and 17 more: https://git.openjdk.java.net/jdk16/compare/afc44414d551d9fc342a733651777227f2f95eac...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

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

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Dec 15, 2020
@DamonFool
Copy link
Member Author

Thanks @vnkozlov for your review.

@neliasso , are you also OK with this change?
Thanks.

@DamonFool
Copy link
Member Author

May I get a second review for this fix?
Thanks.

Copy link
Member

@TobiHartmann TobiHartmann left a comment

Choose a reason for hiding this comment

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

Looks good.

@DamonFool
Copy link
Member Author

Thanks @TobiHartmann for your review.
/integrate

@openjdk openjdk bot closed this Dec 18, 2020
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Dec 18, 2020
@openjdk
Copy link

openjdk bot commented Dec 18, 2020

@DamonFool Since your change was applied there have been 27 commits pushed to the master branch:

  • 38593a4: 8257974: Regression 21% in DaCapo-lusearch-large after JDK-8236926
  • 7afb01d: 8258373: Update the text handling in the JPasswordField
  • cbc3fee: 8258259: Unicode linebreak matching behavior is incorrect; backout JDK-8235812
  • 7320e05: 8258647: TestCharVect2 is very slow
  • 9fdfc6d: 8225072: Add LuxTrust certificate that is expiring in March 2021 to list of allowed but expired certs
  • 30ca0a5: 8247994: Localize javadoc search
  • 47c180d: 8258515: javac should issue an error if an annotation is nested in a local class or interface
  • cb5a6b1: 8258225: compiler/c2/cr6340864/TestIntVect.java runs faster in interpreter
  • 61cbf0f: 8258293: tools/jpackage/share/RuntimePackageTest.java#id0 with RuntimePackageTest.testUsrInstallDir2
  • 7aac4dc: 8257621: JFR StringPool misses cached items across consecutive recordings
  • ... and 17 more: https://git.openjdk.java.net/jdk16/compare/afc44414d551d9fc342a733651777227f2f95eac...master

Your commit was automatically rebased without conflicts.

Pushed as commit 45a150b.

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

@DamonFool DamonFool deleted the JDK-8258134 branch December 18, 2020 13:05
@kevinrushforth
Copy link
Member

This breaks the build for JDK 16 on Windows.

I see that the pre-submit tests were not run on this pull request. See the following information comment from the Skara bot in the checks section for more information.

@TobiHartmann
Copy link
Member

This breaks the build for JDK 16 on Windows.

I see that the pre-submit tests were not run on this pull request. See the following information comment from the Skara bot in the checks section for more information.

I've filed JDK-8258688.

@TobiHartmann
Copy link
Member

Okay, JDK-8258687 has already been filed for this.

@DamonFool
Copy link
Member Author

Okay, I'll have a look. Sorry for this bug.

@TobiHartmann
Copy link
Member

The problem is that extern int vec_spill_helper has still int in the signature.

@DamonFool
Copy link
Member Author

The problem is that extern int vec_spill_helper has still int in the signature.

Thanks @TobiHartmann for your help.
#51

I didn't know why the build tests were skipped for both pull/21 and pull/51.

@kevinrushforth
Copy link
Member

I didn't know why the build tests were skipped for both pull/21 and pull/51.

You need to enable the GitHub actions to run on your repo. If you go to the checks link I added above, you will see:

In order to run pre-submit tests, the source repository must be properly configured to allow test execution. See https://wiki.openjdk.java.net/display/SKARA/Testing for more information on how to configure this.

@DamonFool
Copy link
Member Author

I didn't know why the build tests were skipped for both pull/21 and pull/51.

You need to enable the GitHub actions to run on your repo. If you go to the checks link I added above, you will see:

In order to run pre-submit tests, the source repository must be properly configured to allow test execution. See https://wiki.openjdk.java.net/display/SKARA/Testing for more information on how to configure this.

OK.
Thanks for your guidance.
I'll fix it next time.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
hotspot-compiler hotspot-compiler-dev@openjdk.java.net integrated Pull request has been integrated
4 participants