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

8259228: Zero: rewrite (put|get)field from if-else chains to switches #1943

Closed
wants to merge 2 commits into from

Conversation

shipilev
Copy link
Member

@shipilev shipilev commented Jan 5, 2021

Current handling for (put|get)field uses if-else chain to select the access type. This can be made more uniform by using switches, like accessor_entry code already does.

Additional testing:

  • Ad-hoc Zero performance tests

Progress

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

Issue

  • JDK-8259228: Zero: rewrite (put|get)field from if-else chains to switches

Reviewers

Download

$ git fetch https://git.openjdk.java.net/jdk pull/1943/head:pull/1943
$ git checkout pull/1943

@bridgekeeper
Copy link

bridgekeeper bot commented Jan 5, 2021

👋 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
Copy link

openjdk bot commented Jan 5, 2021

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

  • hotspot-runtime

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-runtime hotspot-runtime-dev@openjdk.org label Jan 5, 2021
@shipilev shipilev marked this pull request as ready for review January 6, 2021 09:35
@openjdk openjdk bot added the rfr Pull request is ready for review label Jan 6, 2021
@mlbridge
Copy link

mlbridge bot commented Jan 6, 2021

Webrevs

@openjdk
Copy link

openjdk bot commented Jan 6, 2021

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

8259228: Zero: rewrite (put|get)field from if-else chains to switches

Reviewed-by: aph, coleenp

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 master 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 master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jan 6, 2021
@bridgekeeper
Copy link

bridgekeeper bot commented Feb 4, 2021

@shipilev This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

Copy link
Contributor

@coleenp coleenp left a comment

Choose a reason for hiding this comment

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

I guess it's not easy (or performant) to refactor this code into a function. BytecodeInterpreter::run is 2440 lines long.

@shipilev
Copy link
Member Author

shipilev commented Mar 4, 2021

I guess it's not easy (or performant) to refactor this code into a function. BytecodeInterpreter::run is 2440 lines long.

Yeah... Let me retest this on current sources and then integrate.

@openjdk
Copy link

openjdk bot commented Mar 4, 2021

⚠️ @shipilev This pull request contains merges that bring in commits not present in the target repository. Since this is not a "merge style" pull request, these changes will be squashed when this pull request in integrated. If this is your intention, then please ignore this message. If you want to preserve the commit structure, you must change the title of this pull request to Merge <project>:<branch> where <project> is the name of another project in the OpenJDK organization (for example Merge jdk:master).

@shipilev
Copy link
Member Author

shipilev commented Mar 5, 2021

/integrate

@openjdk openjdk bot closed this Mar 5, 2021
@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 Mar 5, 2021
@openjdk
Copy link

openjdk bot commented Mar 5, 2021

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

  • 9730266: 8262973: Verify ParCompactionManager instance in PCAdjustPointerClosure
  • d91550e: 8262998: Vector API intrinsincs should not modify IR when bailing out
  • 80182f9: 8260925: HttpsURLConnection does not work with other JSSE provider.
  • dbef0ec: 6323374: (coll) Optimize Collections.unmodifiable* and synchronized*
  • ee09bad: 8262300: jpackage app-launcher fails on linux when using JDK11 based runtime
  • 351889f: 8262508: Vector API's ergonomics is incorrect
  • 718d4d4: 8262989: Vectorize VectorShuffle checkIndexes, wrapIndexes and laneIsValid methods
  • c8b23e2: 8262064: Make compiler/ciReplay tests ignore lambdas in compilation replay
  • 02fbcb5: 8261532: Archived superinterface class cannot be accessed
  • 109af7b: 8261518: jpackage looks for main module in current dir when there is no module-path
  • ... and 3 more: https://git.openjdk.java.net/jdk/compare/a6427c85eeb06fe080864bcad1d44447150d10a6...master

Your commit was automatically rebased without conflicts.

Pushed as commit 75fb7cc.

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

@shipilev shipilev deleted the JDK-8259228-zero-switch branch March 10, 2021 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-runtime hotspot-runtime-dev@openjdk.org integrated Pull request has been integrated
3 participants