Skip to content

8321137: Reconsider ICStub alignment #17277

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

Closed

Conversation

shipilev
Copy link
Member

@shipilev shipilev commented Jan 5, 2024

This continues from #16911. It initially started as performance optimization to compact ICStubs, but I think the safety arguments for fitting the ICStub per instruction cache line prevails. See bug and previous PR for more gory details. The footprint improvements on some architectures come as side-effect of untying the ICStub size from CodeEntryAlignment to (sometimes lower) cache line size.

Note that the size of ICStub is important, because ICBuffer is small (10K by default), and its depletion causes the ICBufferFull safepoint. I would make a (separate) argument to bump the default ICBuffer size a bit to make it less important.

Current patch affects ICStub size in different ways on different platforms, since current size is effectively 2xCodeEntryAlignment and new size is cache line size:

  • ARM32: 32 -> 64 bytes :(
  • AArch64: 128 -> 64 bytes :)
  • x86_64: 64 -> 64 bytes :|
  • x86_32: 32 -> 64 bytes :(
  • PPC64: 512 -> 128 bytes :))
  • RISC-V: 128 -> 64 bytes :)
  • S390X: 128 -> 256 bytes :(
  • Zero: <not applicable, Zero does not use IC stubs>

Additional testing:

  • Linux x86_64 server fastdebug, tier{1,2,3,4}
  • Linux AArch64 server fastdebug, tier{1,2,3,4}

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-8321137: Reconsider ICStub alignment (Enhancement - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 17277

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jan 5, 2024

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

@shipilev shipilev mentioned this pull request Jan 5, 2024
5 tasks
@openjdk openjdk bot added the rfr Pull request is ready for review label Jan 5, 2024
@openjdk
Copy link

openjdk bot commented Jan 5, 2024

@shipilev 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 Jan 5, 2024
@mlbridge
Copy link

mlbridge bot commented Jan 5, 2024

Webrevs

Copy link
Member

@dean-long dean-long left a comment

Choose a reason for hiding this comment

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

Nice job minimizing the changes.

@openjdk
Copy link

openjdk bot commented Jan 6, 2024

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

8321137: Reconsider ICStub alignment

Reviewed-by: dlong, eosterlund, mdoerr, fyang, 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 28 new commits pushed to 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 Jan 6, 2024
@shipilev
Copy link
Member Author

Thanks @dean-long! Any other takers?

Notably, I would like opinions of platform maintainers: @theRealAph, @TheRealMDoerr, @RealFYang, @bulasevich.

@TheRealMDoerr
Copy link
Contributor

It's probably good, but are you aware of the plans to remove the ICStubs completely? @fisk may have an opinion on it.

@shipilev
Copy link
Member Author

It's probably good, but are you aware of the plans to remove the ICStubs completely? @fisk may have an opinion on it.

Yes, I did x86_32 version for Erik. I think we want something we can support in JDK update releases. I think the ICStub removal would not be backportable at all.

@TheRealMDoerr
Copy link
Contributor

Ok. I think it's good for backports. I'll put it in our test queue.

Copy link
Contributor

@fisk fisk left a comment

Choose a reason for hiding this comment

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

Seems like a reasonable band-aid to backport. Looks good.

Copy link
Contributor

@TheRealMDoerr TheRealMDoerr left a comment

Choose a reason for hiding this comment

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

Test results are good. Thumbs up from my side!

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.

LGTM. Also performed tier1-3 test with fastdebug build on linux-riscv64 platform.

@shipilev
Copy link
Member Author

OK, thanks! I am going to merge it, and look for follow-ups, if any.

/integrate

@openjdk
Copy link

openjdk bot commented Jan 17, 2024

Going to push as commit 7be9f1d.
Since your change was applied there have been 31 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 Jan 17, 2024
@openjdk openjdk bot closed this Jan 17, 2024
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jan 17, 2024
@openjdk
Copy link

openjdk bot commented Jan 17, 2024

@shipilev Pushed as commit 7be9f1d.

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

@shipilev shipilev deleted the JDK-8321137-reconsider-icstub-align branch January 31, 2024 16:13
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.

6 participants