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

8253757: Add LLVM-based backend for hsdis #7531

Closed
wants to merge 3 commits into from

Conversation

magicus
Copy link
Member

@magicus magicus commented Feb 18, 2022

Third time's a charm! After the two previous closed PRs for this issue, I think this functionality is finally ready to enter mainline. :)

This code is at it's core the same as the previous PR. The main C++ hsdis implementation is still the one @luhenry wrote, with some changes. As in the previous PR, I extracted the LLVM-specific part into a separate file. In addition to the last PR, I have also fixed a warning, and added a patch inspired by @nick-arm for getting past instructions unknown to LLVM.

Thanks to the prototype written by @JornVernee (and his graciously providing me with a working version of LLVM build for Windows), this PR now has full support for LLVM on Windows (as well as Linux and macOS).

Finally, I have cleaned up the integration in autoconf and Hsdis.gmk, and written a thorough guide in the README on how to build witth LLVM, on Windows and on saner platforms. :)

I'm pretty sure this means that all comments and criticism in the previous PR has been addressed.

Huge thanks to everyone who has helped me with getting this PR in place. I have a hard time remember a feature that has been so tricky to get in place, for something to seemingly simple...


Progress

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

Issue

Reviewers

Contributors

  • Magnus Ihse Bursie <ihse@openjdk.org>
  • Ludovic Henry <luhenry@openjdk.org>
  • Jorn Vernee <jvernee@openjdk.org>
  • Nick Gasson <ngasson@openjdk.org>

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 7531

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 18, 2022

👋 Welcome back ihse! 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.

@magicus
Copy link
Member Author

magicus commented Feb 18, 2022

/contributor add ihse luhenry jvernee ngasson

@openjdk openjdk bot added the rfr Pull request is ready for review label Feb 18, 2022
@openjdk
Copy link

openjdk bot commented Feb 18, 2022

@magicus Could not parse ihse luhenry jvernee ngasson as a valid contributor.
Syntax: /contributor (add|remove) [@user | openjdk-user | Full Name <email@address>]. For example:

  • /contributor add @openjdk-bot
  • /contributor add duke
  • /contributor add J. Duke <duke@openjdk.org>

@openjdk
Copy link

openjdk bot commented Feb 18, 2022

@magicus The following labels will be automatically applied to this pull request:

  • build
  • hotspot-compiler

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

@openjdk openjdk bot added build build-dev@openjdk.org hotspot-compiler hotspot-compiler-dev@openjdk.org labels Feb 18, 2022
@mlbridge
Copy link

mlbridge bot commented Feb 18, 2022

Webrevs

@magicus
Copy link
Member Author

magicus commented Feb 18, 2022

/contributor add ihse
/contributor add luhenry
/contributor add jvernee
/contributor add ngasson

@openjdk
Copy link

openjdk bot commented Feb 18, 2022

@magicus
Contributor Magnus Ihse Bursie <ihse@openjdk.org> successfully added.

@openjdk
Copy link

openjdk bot commented Feb 18, 2022

@magicus
Contributor Ludovic Henry <luhenry@openjdk.org> successfully added.

@openjdk
Copy link

openjdk bot commented Feb 18, 2022

@magicus
Contributor Jorn Vernee <jvernee@openjdk.org> successfully added.

@openjdk
Copy link

openjdk bot commented Feb 18, 2022

@magicus
Contributor Nick Gasson <ngasson@openjdk.org> successfully added.

Copy link
Member

@erikj79 erikj79 left a comment

Choose a reason for hiding this comment

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

Build changes look good. I can't comment on the hsdis implementation.

@openjdk
Copy link

openjdk bot commented Feb 18, 2022

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

8253757: Add LLVM-based backend for hsdis

Co-authored-by: Magnus Ihse Bursie <ihse@openjdk.org>
Co-authored-by: Ludovic Henry <luhenry@openjdk.org>
Co-authored-by: Jorn Vernee <jvernee@openjdk.org>
Co-authored-by: Nick Gasson <ngasson@openjdk.org>
Reviewed-by: erikj, luhenry

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

  • f5120b7: 8282056: Clean up com.sun.tools.javac.util.GraphUtils
  • e336504: 8280866: SuppressWarnings does not work properly in package-info and module-info
  • e8224f7: 8282089: [BACKOUT] Parallel: Refactor PSCardTable::scavenge_contents_parallel
  • 834d55c: 8277300: Issues with javadoc support for preview features
  • 138a171: 8281267: VM HeapDumper dumps array classes several times
  • 7bcca76: 8279068: IGV: Update to work with JDK 16 and 17
  • c928958: 8281936: compiler/arguments/TestCodeEntryAlignment.java fails on AVX512 machines
  • a22f422: 8037573: Typo in DefaultTreeModel docs: askAllowsChildren instead of asksAllowsChildren
  • fdce35f: 8282025: assert(ctrl != __null) failed: control out is assumed to be unique after JDK-8281732

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
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 Feb 18, 2022
@luhenry
Copy link
Member

luhenry commented Feb 18, 2022

Thanks again for pushing that forward! It's always good to have an alternative especially for porting to new platforms and architectures.

@magicus
Copy link
Member Author

magicus commented Feb 21, 2022

/integrate

@openjdk
Copy link

openjdk bot commented Feb 21, 2022

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

  • bdae1d8: 8282147: [TESTBUG] waitForIdle after creating frame in JSpinnerMouseAndKeyPressTest.java
  • 51f4420: 8282130: (bf) Remove unused ARRAY_BASE_OFFSET, ARRAY_INDEX_SCALE from read-only Heap Buffers
  • 34aae32: 8282166: JDK-8282158 changed ECParameters' package by accident
  • c5d9142: 8282096: G1: Remove redundant checks in G1CardSet::free_mem_object
  • 52a85d8: 8282158: ECParameters InvalidParameterSpecException messages missed ECKeySizeParameterSpec
  • 4e0b81c: 8281544: assert(VM_Version::supports_avx512bw()) failed for Tests jdk/incubator/vector/
  • 8563d86: 8282085: The REGISTER_DEFINITION macro is useless after JDK-8269122
  • d28b048: 8281815: x86: Use short jumps in TIG::generate_slow_signature_handler
  • d7f31d0: 8282077: PKCS11 provider C_sign() impl should handle CKR_BUFFER_TOO_SMALL error
  • d3749de: 8277488: Add expiry exception for Digicert (geotrustglobalca) expiring in May 2022
  • ... and 14 more: https://git.openjdk.java.net/jdk/compare/f830cbec909b91ad0f00f46a3496d83ecb5912ed...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Feb 21, 2022

@magicus Pushed as commit d7a706a.

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

@magicus magicus deleted the hsdis-with-llvm branch February 21, 2022 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build build-dev@openjdk.org hotspot-compiler hotspot-compiler-dev@openjdk.org integrated Pull request has been integrated
3 participants