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

8279668: x86: AVX2 versions of vpxor should be asserted #7005

Closed
wants to merge 5 commits into from

Conversation

shipilev
Copy link
Contributor

@shipilev shipilev commented Jan 10, 2022

Got the SIGILLs on some machines when testing JDK-8279621. That patch started using shorter vpxor versions on UseAVX = 1 path, which tried to use VEX.256-encoded vpxor instruction that is only available on AVX2. This should be at very least asserted in assembler code.

Also fixed the implicit bool -> int conversion to vector_len.

Additional testing:

  • Linux x86_64 fastdebug tier1 with -XX:UseAVX=1

Progress

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

Issue

  • JDK-8279668: x86: AVX2 versions of vpxor should be asserted

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 7005

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

Using diff file

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

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Jan 10, 2022

👋 Welcome back shade! 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 label Jan 10, 2022
@openjdk
Copy link

@openjdk openjdk bot commented Jan 10, 2022

@shipilev The following label will be automatically applied to this pull request:

  • hotspot

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the hotspot label Jan 10, 2022
@mlbridge
Copy link

@mlbridge mlbridge bot commented Jan 10, 2022

Webrevs

@merykitty
Copy link
Contributor

@merykitty merykitty commented Jan 10, 2022

Hi, I think the assert should be inserted in the assembler instead. Also, I would prefer AVX_256bit instead of 1.
Thanks.

@shipilev
Copy link
Contributor Author

@shipilev shipilev commented Jan 10, 2022

Hi, I think the assert should be inserted in the assembler instead.

I think Assembler::vpxor actually does it right already, and the problem is only in "shortcut" macro-method for AVX2. So the assert is where it should be.

Also, I would prefer AVX_256bit instead of 1. Thanks.

Good idea, fixed.

@merykitty
Copy link
Contributor

@merykitty merykitty commented Jan 10, 2022

What I mean is an assert similar to:

assert(vector_len == AVX_128bit? VM_Version::supports_avx() :

Thanks.

@shipilev
Copy link
Contributor Author

@shipilev shipilev commented Jan 10, 2022

What I mean is an assert similar to:

assert(vector_len == AVX_128bit? VM_Version::supports_avx() :

Ah, I see! Added in new commit.

Copy link
Contributor

@vnkozlov vnkozlov left a comment

Good.

Copy link
Member

@DamonFool DamonFool left a comment

LGTM
Thanks for your update.

@openjdk
Copy link

@openjdk openjdk bot commented Jan 10, 2022

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

8279668: x86: AVX2 versions of vpxor should be asserted

Reviewed-by: kvn, jiefu

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

  • 4471e95: 8279645: JFR: The cacheEventType in Dispatcher is never assigned
  • d7e6e9b: 8279643: JFR: Explain why path is sometimes missing from FileRead and FileWrite events
  • 0d19096: 8279642: JFR: Remove unnecessary creation of Duration and Instant objects
  • d9b1bb5: Merge
  • 40df5df: 8279398: jdk/jfr/api/recording/time/TestTimeMultiple.java failed with "RuntimeException: getStopTime() > afterStop"
  • ad34f03: 8279515: C1: No inlining through invokedynamic and invokestatic call sites when resolved class is not linked
  • 928e347: 8279032: compiler/loopopts/TestSkeletonPredicateNegation.java times out with -XX:TieredStopAtLevel < 4
  • 354c904: 8273452: DocTrees.getDocCommentTree should be specified as idempotent
  • 06b4d49: 8278344: sun/security/pkcs12/KeytoolOpensslInteropTest.java test fails because of different openssl output
  • 8f969a1: 8278930: javac tries to compile a file twice via PackageElement.getEnclosedElements
  • ... and 4 more: https://git.openjdk.java.net/jdk/compare/dee447f8ae788c6c1f6cd1e1fcb93faceab37b6c...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 label Jan 10, 2022
@shipilev
Copy link
Contributor Author

@shipilev shipilev commented Jan 11, 2022

Thank you for reviews!

/integrate

@openjdk
Copy link

@openjdk openjdk bot commented Jan 11, 2022

Going to push as commit 2bbeae3.
Since your change was applied there have been 21 commits pushed to the master branch:

  • 3121898: 8279703: G1: Remove unused force_not_compacted local in G1CalculatePointersClosure::do_heap_region
  • bf7bcaa: 8277748: Obsolete the MinInliningThreshold flag in JDK 19
  • 126328c: 8279560: AArch64: generate_compare_long_string_same_encoding and LARGE_LOOP_PREFETCH alignment
  • ec5a455: 8279682: JFR: Remove dead code
  • 6504458: 8279647: JFR: Unclosed directory stream
  • 2f13872: 8279646: JFR: Remove recursive call in jdk.jfr.internal.Control
  • 2f7665b: 8279644: hsdis may not work when it was built with --with-binutils=system
  • 4471e95: 8279645: JFR: The cacheEventType in Dispatcher is never assigned
  • d7e6e9b: 8279643: JFR: Explain why path is sometimes missing from FileRead and FileWrite events
  • 0d19096: 8279642: JFR: Remove unnecessary creation of Duration and Instant objects
  • ... and 11 more: https://git.openjdk.java.net/jdk/compare/dee447f8ae788c6c1f6cd1e1fcb93faceab37b6c...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated label Jan 11, 2022
@openjdk openjdk bot closed this Jan 11, 2022
@openjdk openjdk bot removed ready rfr labels Jan 11, 2022
@openjdk
Copy link

@openjdk openjdk bot commented Jan 11, 2022

@shipilev Pushed as commit 2bbeae3.

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

@shipilev shipilev deleted the JDK-8279668-vpxor-avx2 branch Jan 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot integrated
4 participants