jdk icon indicating copy to clipboard operation
jdk copied to clipboard

8285487: AArch64: Do not generate unneeded trampolines for runtime calls

Open eastig opened this issue 2 years ago • 16 comments

Runtime calls are calls of non-compiled methods. Non-compiled methods stay forever in CodeCache. If they are always within the branch range, they don't need trampolines.

This PR adds is_always_within_branch_range(Address entry).

Results from DaCapo: the total number of eliminated trampolines per a benchmark run

+----------+--------+
| avrora   |  15491 |
| batik    |  75837 |
| biojava  |  13927 |
| eclipse  | 414143 |
| fop      | 119267 |
| graphchi |   7665 |
| jme      |   8279 |
| luindex  |  56061 |
| lusearch |  50277 |
| pmd      | 132719 |
| sunflow  |  10689 |
| tomcat   | 186967 |
| xalan    |  50349 |
| zxing    |  41497 |
+----------+--------+

Testing:

  • tier1...tier2: Passed
  • compiler/c2/aarch64/TestTrampoline.java: Passed

Note: compiler/c2/aarch64/TestTrampoline.java requires the release build. This is because debug builds have the branch range set to 2M which causes always generation of trampolines.


Progress

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

Issue

  • JDK-8285487: AArch64: Do not generate unneeded trampolines for runtime calls

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 8403

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

Using diff file

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

eastig avatar Apr 26 '22 16:04 eastig

:wave: Welcome back eastig! 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.

bridgekeeper[bot] avatar Apr 26 '22 16:04 bridgekeeper[bot]

@eastig 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[bot] avatar Apr 26 '22 16:04 openjdk[bot]

@simonis, @bulasevich Could you please review?

eastig avatar Apr 26 '22 18:04 eastig

Hi Vladimir(@vnkozlov), Could you please review the PR?

eastig avatar Apr 28 '22 16:04 eastig

@eastig 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!

bridgekeeper[bot] avatar Jun 01 '22 07:06 bridgekeeper[bot]

@eastig This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the /open pull request command.

bridgekeeper[bot] avatar Jun 29 '22 12:06 bridgekeeper[bot]

/open

eastig avatar Aug 10 '22 16:08 eastig

@eastig This pull request is now open

openjdk[bot] avatar Aug 10 '22 16:08 openjdk[bot]

@eastig this pull request can not be integrated into master due to one or more merge conflicts. To resolve these merge conflicts and update this pull request you can run the following commands in the local repository for your personal fork:

git checkout JDK-8285487
git fetch https://git.openjdk.org/jdk master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push

openjdk[bot] avatar Aug 10 '22 16:08 openjdk[bot]

/label hotspot-compiler

eastig avatar Aug 10 '22 21:08 eastig

@eastig The hotspot-compiler label was successfully added.

openjdk[bot] avatar Aug 10 '22 21:08 openjdk[bot]

@theRealAph @navyxliu @vnkozlov @bulasevich I have updated the PR. Could you please have a look?

eastig avatar Aug 10 '22 21:08 eastig

A failed test is java/util/DoubleStreamSums/CompensatedSums.java on windows-x64. I don't think my changes caused the failure. I found https://bugs.openjdk.org/browse/JDK-8288280.

eastig avatar Aug 12 '22 22:08 eastig

I will wait approval from Andrew before submitting my testing and approving.

vnkozlov avatar Aug 12 '22 22:08 vnkozlov

I will wait approval from Andrew before submitting my testing and approving.

Hi @theRealAph, Do you have any comments? Thanks, Evgeny

eastig avatar Aug 15 '22 11:08 eastig

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

8285487: AArch64: Do not generate unneeded trampolines for runtime calls

Reviewed-by: xliu, aph

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

  • d6961045353897967bb734740225bd1cddf158e5: 4850101: Setting mnemonic to VK_F4 underlines the letter S in a button.
  • 14fd1b6cdfc2f912d350ac0da07f3fe4b1f976e0: 8292921: Rewrite object field printer
  • 4f9065d3d5e914f8e89daf1ff27bba3578b19e20: 8293333: Broken links in JDI specification
  • 2259e427a53440da948315db2272396294036051: 8293197: Avoid double racy reads from non-volatile fields in SharedSecrets
  • 205f992e9ecf9f83bb052ee2e2a32e3f532c5ac9: 8293326: jdk/sun/security/tools/jarsigner/compatibility/SignTwice.java slow on Windows
  • 710a14347344f3cc136f3b7f41aad231fbe43625: 8293445: clhsdb "thread" command gives incorrect error message for bad threadID
  • 57930f8e53e85bd923127bd638286898cfe3b117: 8293285: x86_64: Move libm stub implementations to StubGenerator
  • 5b4c415510cbd1b34217c976006ea900d5917f46: 8293254: x86_64: Extract arraycopy stub implementations into a separate file
  • fb6eb6f26728d379fe666ac87630236f58065bbe: 8293245: x86_64: Extract Adler32 stub implementation into stubGenerator_x86_64_adler.cpp
  • da596182a494a36d37030f18328e52e525fc3565: 8264744: (fs) Use file cloning in Linux version of Files::copy method
  • ... and 318 more: https://git.openjdk.org/jdk/compare/cb37282a12698ae66c27889db9251a5b278624b0...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.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@navyxliu, @vnkozlov, @theRealAph) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

openjdk[bot] avatar Sep 07 '22 14:09 openjdk[bot]

/integrate

eastig avatar Sep 07 '22 14:09 eastig

@eastig Your change (at version 7c475a9e860c2dddf0977bfa1e74b7709c26ef47) is now ready to be sponsored by a Committer.

openjdk[bot] avatar Sep 07 '22 14:09 openjdk[bot]

/sponsor

theRealAph avatar Sep 07 '22 14:09 theRealAph

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

  • d6961045353897967bb734740225bd1cddf158e5: 4850101: Setting mnemonic to VK_F4 underlines the letter S in a button.
  • 14fd1b6cdfc2f912d350ac0da07f3fe4b1f976e0: 8292921: Rewrite object field printer
  • 4f9065d3d5e914f8e89daf1ff27bba3578b19e20: 8293333: Broken links in JDI specification
  • 2259e427a53440da948315db2272396294036051: 8293197: Avoid double racy reads from non-volatile fields in SharedSecrets
  • 205f992e9ecf9f83bb052ee2e2a32e3f532c5ac9: 8293326: jdk/sun/security/tools/jarsigner/compatibility/SignTwice.java slow on Windows
  • 710a14347344f3cc136f3b7f41aad231fbe43625: 8293445: clhsdb "thread" command gives incorrect error message for bad threadID
  • 57930f8e53e85bd923127bd638286898cfe3b117: 8293285: x86_64: Move libm stub implementations to StubGenerator
  • 5b4c415510cbd1b34217c976006ea900d5917f46: 8293254: x86_64: Extract arraycopy stub implementations into a separate file
  • fb6eb6f26728d379fe666ac87630236f58065bbe: 8293245: x86_64: Extract Adler32 stub implementation into stubGenerator_x86_64_adler.cpp
  • da596182a494a36d37030f18328e52e525fc3565: 8264744: (fs) Use file cloning in Linux version of Files::copy method
  • ... and 318 more: https://git.openjdk.org/jdk/compare/cb37282a12698ae66c27889db9251a5b278624b0...master

Your commit was automatically rebased without conflicts.

openjdk[bot] avatar Sep 07 '22 14:09 openjdk[bot]

@theRealAph @eastig Pushed as commit 6ff4775b717d91f9acf24d014ae155dfacac06c5.

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

openjdk[bot] avatar Sep 07 '22 14:09 openjdk[bot]

@theRealAph Thank you!

eastig avatar Sep 07 '22 14:09 eastig