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

8326235: RISC-V: Size CodeCache for short calls encoding #17924

Closed
wants to merge 1 commit into from

Conversation

robehn
Copy link
Contributor

@robehn robehn commented Feb 20, 2024

Hi, please consider.

This limits the code cache to a size such that all code cache -> code cache calls and jump may always use auipc+jalr.
(this is what we do in practice)
Thus we can fix the encoding for those and not have variable encoding.
The reduction of the size is just 2k, but due to option passing the real reduction is probably 1M.
-XX:ReservedCodeCacheSize=2047M (down from 2048)

Note, specifying '2G' gives the message:

Invalid ReservedCodeCacheSize=2048M. Must be at most 2047M.

Manually test, no test I found uses this large code cache.


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

  • JDK-8326235: RISC-V: Size CodeCache for short calls encoding (Enhancement - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 17924

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 20, 2024

👋 Welcome back rehn! 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 Pull request is ready for review label Feb 20, 2024
@openjdk
Copy link

openjdk bot commented Feb 20, 2024

@robehn 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 hotspot-dev@openjdk.org label Feb 20, 2024
@mlbridge
Copy link

mlbridge bot commented Feb 20, 2024

Webrevs

Copy link
Member

@RealFYang RealFYang left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this potential risk. We will be more certain in code emitted for a cc -> cc call. In fact, I was also planning to do a similar fix for this very uncommon case :-)

@openjdk
Copy link

openjdk bot commented Feb 20, 2024

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

8326235: RISC-V: Size CodeCache for short calls encoding

Reviewed-by: fyang, tonyp

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

  • 33834b7: 8326375: [REDO] Clean up NativeCompilation.gmk and its newly created parts
  • 2352268: 8326334: JFR failed assert(used(klass)) failed: invariant
  • 492e8bf: 8325587: Shenandoah: ShenandoahLock should allow blocking in VM
  • 5f16f34: 8326370: Remove redundant and misplaced micros from StringBuffers
  • 921507c: 8326319: G1: Remove unused G1ConcurrentMark::_init_times
  • 68eb5a1: 8321075: RISC-V: UseSystemMemoryBarrier lacking proper OS support
  • 04d43c4: 8187759: Background not refreshed when painting over a transparent JFrame
  • d5f3d5c: 8326201: [S390] Need to bailout cleanly if creation of stubs fails when code cache is out of space
  • d31fd78: 8325496: Make TrimNativeHeapInterval a product switch
  • 27003b5: 8326090: Rename jvmti_aod.h
  • ... and 17 more: https://git.openjdk.org/jdk/compare/69a11c7f7ea7c4195a8ee56391bdf04c75bd8156...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 Feb 20, 2024
@robehn
Copy link
Contributor Author

robehn commented Feb 20, 2024

Thanks for fixing this potential risk. We will be more certain in code emitted for a cc -> cc call. In fact, I was also planning to do a similar fix for this very uncommon case :-)

Thanks!

@gctony
Copy link
Contributor

gctony commented Feb 21, 2024

Looks good.

@robehn
Copy link
Contributor Author

robehn commented Feb 21, 2024

Looks good.

Thanks!

@robehn
Copy link
Contributor Author

robehn commented Feb 21, 2024

/integrate

@openjdk
Copy link

openjdk bot commented Feb 21, 2024

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

  • c022431: 8326412: debuginfo files should not have executable bit set
  • 33834b7: 8326375: [REDO] Clean up NativeCompilation.gmk and its newly created parts
  • 2352268: 8326334: JFR failed assert(used(klass)) failed: invariant
  • 492e8bf: 8325587: Shenandoah: ShenandoahLock should allow blocking in VM
  • 5f16f34: 8326370: Remove redundant and misplaced micros from StringBuffers
  • 921507c: 8326319: G1: Remove unused G1ConcurrentMark::_init_times
  • 68eb5a1: 8321075: RISC-V: UseSystemMemoryBarrier lacking proper OS support
  • 04d43c4: 8187759: Background not refreshed when painting over a transparent JFrame
  • d5f3d5c: 8326201: [S390] Need to bailout cleanly if creation of stubs fails when code cache is out of space
  • d31fd78: 8325496: Make TrimNativeHeapInterval a product switch
  • ... and 18 more: https://git.openjdk.org/jdk/compare/69a11c7f7ea7c4195a8ee56391bdf04c75bd8156...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Feb 21, 2024

@robehn Pushed as commit 51e2dde.

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

@robehn robehn deleted the 8326235 branch April 30, 2024 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot hotspot-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

3 participants