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

8297476: Increase InlineSmallCode default from 1000 to 2500 for RISC-V #11310

Closed
wants to merge 2 commits into from

Conversation

RealFYang
Copy link
Member

@RealFYang RealFYang commented Nov 23, 2022

The current default value of InlineSmallCode on RISC-V is 1000. I witnessed notable performance improvement by increasing this value to 2000 when running the Renaissance benchmark. Here are the exact commands used for each of the benchmarks:

Before:
$ java -XX:InlineSmallCode=1000 -XX:+UseParallelGC -Xms12g -Xmx12g -jar renaissance-gpl-0.14.1.jar -r 40 all

After:
$ java -XX:InlineSmallCode=2000 -XX:+UseParallelGC -Xms12g -Xmx12g -jar renaissance-gpl-0.14.1.jar -r 40 all

Best run time for one repetition (ms – lower is better) on Unmatched board:

Benchmark Before After Ratio
AkkaUct 75629.766 71839.905 5.01%
Reactors 98120.668 91597.120 6.65%
DecTree 12144.666 11801.740 2.82%
Als 57719.166 53307.041 7.64%
ChiSquare 21704.666 16301.189 24.89%
GaussMix 17494.891 17497.291 -0.02%
LogRegression 11881.352 11382.722 4.20%
MovieLens 100944.374 96510.793 4.39%
NaiveBayes 81946.569 68566.763 16.32%
PageRank 43689.497 43204.553 1.11%
FjKmeans 68398.667 67261.674 1.66%
FutureGenetic 31752.695 31524.457 0.72%
Mnemonics 126312.832 115335.512 8.69%
ParMnemonics 93406.666 88320.443 5.45%
Scrabble 6894.853 6888.426 0.09%
RxScrabble 5163.473 4875.730 5.08%
Dotty 14852.405 14667.255 1.25%
ScalaDoku 95770.117 39728.637 58.52%
Philosophers 13974.965 11579.551 17.14%
ScalaStmBench7 12185.093 12243.016 -0.47%
FinagleChirper 32676.065 30900.282 5.44%
FinagleHttp 30633.640 30191.792 1.44%

Other testing: tier1-tier3 tested on Unmatched board.

I have also tested other possible values for InlineSmallCode like 1500 and 2500, but the numbers say show 2000 would outperform those values in most of the cases. And I can verify no regressions across at least following benchmarks:

  • Dacapo
  • SPECjvm2008
  • SPECjbb2005
  • SPECjbb2015

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-8297476: Increase InlineSmallCode default from 1000 to 2500 for RISC-V

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 11310

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 23, 2022

👋 Welcome back fyang! 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 Nov 23, 2022
@openjdk
Copy link

openjdk bot commented Nov 23, 2022

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

  • hotspot-compiler

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-compiler hotspot-compiler-dev@openjdk.org label Nov 23, 2022
@mlbridge
Copy link

mlbridge bot commented Nov 23, 2022

Webrevs

Copy link
Member

@shipilev shipilev left a comment

Choose a reason for hiding this comment

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

I am curious: is 2000 significantly better than 2500 that other platforms overrides do here? If not, I'd prefer 2500, so that we could eventually just use it as platform-independent default value.

@RealFYang
Copy link
Member Author

I am curious: is 2000 significantly better than 2500 that other platforms overrides do here? If not, I'd prefer 2500, so that we could eventually just use it as platform-independent default value.

Well, not that significant. I am OK to default to '2500' too.
I have pushed a new version unifying the code for the three CPUs. Please take another look. Thanks.

@RealFYang RealFYang changed the title 8297476: Increase InlineSmallCode default from 1000 to 2000 for RISC-V 8297476: Increase InlineSmallCode default from 1000 to 2500 for RISC-V Nov 23, 2022
Copy link
Member

@shipilev shipilev left a comment

Choose a reason for hiding this comment

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

I like this, thanks.

@openjdk
Copy link

openjdk bot commented Nov 23, 2022

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

8297476: Increase InlineSmallCode default from 1000 to 2500 for RISC-V

Reviewed-by: shade, yzhu

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

  • abeddab: 6528710: sRGB-ColorSpace to sRGB-ColorSpace Conversion
  • 09ac9eb: 8297533: ProblemList java/io/File/TempDirDoesNotExist.java test failing on windows-x64
  • 5325145: 8297529: ProblemList javax/swing/JFileChooser/8046391/bug8046391.java on windows-x64
  • 91cd8a0: 8297525: jdk/jshell/ToolBasicTest.java fails after JDK-8295984
  • 6dc4d89: 7181214: Need specify SKF translateKey(SecurityKey) method requires instance of PBEKey for PBKDF2 algorithms
  • 2afb4c3: 8297338: JFR: RemoteRecordingStream doesn't respect setMaxAge and setMaxSize
  • 8df3bc4: 8290313: Produce warning when user specified java.io.tmpdir directory doesn't exist
  • 086763a: 8297154: Improve safepoint cleanup logging
  • e6e57fe: 8297507: Update header after JDK-8297230
  • bc59f2a: 8295984: Remove unexpected JShell feature
  • ... and 6 more: https://git.openjdk.org/jdk/compare/b4bd287f736b6b5dcfe1b183cae9b11eb6f22686...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 Nov 23, 2022
Copy link

@yhzhu20 yhzhu20 left a comment

Choose a reason for hiding this comment

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

Looks good.

@RealFYang
Copy link
Member Author

RealFYang commented Nov 24, 2022

@shipilev @yhzhu20 : Thanks for the review!

I have also verified on both linux-x64 and linux-aarch64 platforms with following commands, still work as expected.

$ java -XX:+PrintFlagsFinal -version | grep InlineSmallCode
     intx InlineSmallCode                          = 2500                                {C2 pd product} {default}
openjdk version "20-internal" 2023-03-21
OpenJDK Runtime Environment (build 20-internal-adhoc.fyang.openjdk-jdk)
OpenJDK 64-Bit Server VM (build 20-internal-adhoc.fyang.openjdk-jdk, mixed mode, sharing)

$ java -XX:-TieredCompilation -XX:+PrintFlagsFinal -version | grep InlineSmallCode
     intx InlineSmallCode                          = 1000                                {C2 pd product} {default}
openjdk version "20-internal" 2023-03-21
OpenJDK Runtime Environment (build 20-internal-adhoc.fyang.openjdk-jdk)
OpenJDK 64-Bit Server VM (build 20-internal-adhoc.fyang.openjdk-jdk, mixed mode, sharing)

/integrate

@openjdk
Copy link

openjdk bot commented Nov 24, 2022

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

  • 070a84c: 8297192: Warning generating API docs for javax.management.MBeanServer: overridden methods do not document exception type
  • 3c4d520: 8296671: [JFR] jdk.ContainerConfiguration event should include host total memory
  • 8b73970: 8296208: AArch64: Enable SHA512 intrinsic by default on supported hardware
  • f4cf758: 8297491: Loom: Stack chunks allocation code uses TLABs even when TLABs are disabled
  • 5e5b774: 8296768: Use different explicit claim marks for CLDs in Parallel and Serial GC
  • 9c77e41: 8297445: PPC64: Represent Registers as values
  • 2f8a5c2: 8297480: GetPrimitiveArrayCritical in imageioJPEG misses result - NULL check
  • abeddab: 6528710: sRGB-ColorSpace to sRGB-ColorSpace Conversion
  • 09ac9eb: 8297533: ProblemList java/io/File/TempDirDoesNotExist.java test failing on windows-x64
  • 5325145: 8297529: ProblemList javax/swing/JFileChooser/8046391/bug8046391.java on windows-x64
  • ... and 13 more: https://git.openjdk.org/jdk/compare/b4bd287f736b6b5dcfe1b183cae9b11eb6f22686...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Nov 24, 2022

@RealFYang Pushed as commit 5e196b4.

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

@RealFYang RealFYang deleted the JDK-8297476 branch November 28, 2022 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-compiler hotspot-compiler-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

3 participants