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

8296426: x86: Narrow UseAVX and UseSSE flags #10997

Closed
wants to merge 4 commits into from

Conversation

cl4es
Copy link
Member

@cl4es cl4es commented Nov 4, 2022

This patch narrows down the UseAVX and UseSSE flags to their actual supported range and uses int rather than intx for their type. This avoids need for some silly casts, and surprisingly has a small beneficial effect to binary size (-4kb libjvm on linux-x64)

This changes behavior of previously in-range values: -XX:UseAVX=4 would emit a strongly worded warning, but with the proposed change we'll instead terminate the JVM with an error similar to -XX:UseAVX=100. I believe this is too trivial for a CSR, since it only changes behavior for unsupported values.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/10997/head:pull/10997
$ git checkout pull/10997

Update a local copy of the PR:
$ git checkout pull/10997
$ git pull https://git.openjdk.org/jdk pull/10997/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 10997

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/10997.diff

@cl4es cl4es changed the title 8296426 x86: Narrow UseAVX and UseSSE flags 8296426: x86: Narrow UseAVX and UseSSE flags Nov 4, 2022
@cl4es
Copy link
Member Author

cl4es commented Nov 4, 2022

/label add hotspot-compiler

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 4, 2022

👋 Welcome back redestad! 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 rfr Pull request is ready for review hotspot-compiler hotspot-compiler-dev@openjdk.org labels Nov 4, 2022
@openjdk
Copy link

openjdk bot commented Nov 4, 2022

@cl4es
The hotspot-compiler label was successfully added.

Copy link
Contributor

@iwanowww iwanowww left a comment

Choose a reason for hiding this comment

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

Nice! Looks good.

@openjdk
Copy link

openjdk bot commented Nov 4, 2022

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

8296426: x86: Narrow UseAVX and UseSSE flags

Reviewed-by: vlivanov, kvn

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

  • dd5d4df: 8295658: G1: Refactor G1SegmentedArray to indicate that it is an allocator
  • cf65605: 8296445: C++ syntax error in jdwpTransport.h
  • 1169dc0: 8296447: RISC-V: Make the operands order of vrsub_vx/vrsub_vi consistent with RVV 1.0 spec
  • 4c80dff: 8296435: RISC-V: Small refactoring for increment/decrement
  • 47d2c7b: 8295376: Improve debug agent virtual thread performance when no debugger is attached
  • 76790ad: 8295673: Deprecate and disable legacy parallel class loading workaround for non-parallel-capable class loaders
  • b6738c1: 8295663: Rephrase introduction to testing.md
  • 7e85b41: 8296154: [macos] Change "/Applications" to "Applications" in DMG image
  • 60db5f2: 8294020: improve errors for record declarations
  • 520db1e: 8296485: BuildEEBasicConstraints.java test fails with SunCertPathBuilderException
  • ... and 15 more: https://git.openjdk.org/jdk/compare/f857f795a9fc8b116bfc6b039114051061950e28...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 Nov 4, 2022
@mlbridge
Copy link

mlbridge bot commented Nov 4, 2022

Webrevs

Copy link
Contributor

@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.

You need to fix these flags type in JVMCI too. JVMCI tests failed.

@cl4es
Copy link
Member Author

cl4es commented Nov 8, 2022

You need to fix these flags type in JVMCI too. JVMCI tests failed.

Fixed. Interestingly the only use of these that I could find assume the flags are int already (perhaps a misunderstanding of intx): https://github.com/openjdk/jdk/blob/master/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.amd64/src/jdk/vm/ci/hotspot/amd64/AMD64HotSpotVMConfig.java#L45

Copy link
Contributor

@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.

@cl4es
Copy link
Member Author

cl4es commented Nov 8, 2022

Thanks!
/integrate

@openjdk
Copy link

openjdk bot commented Nov 8, 2022

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

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Nov 8, 2022
@openjdk openjdk bot closed this Nov 8, 2022
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Nov 8, 2022
@openjdk
Copy link

openjdk bot commented Nov 8, 2022

@cl4es Pushed as commit d9b25e8.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-compiler hotspot-compiler-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

3 participants