Skip to content

Conversation

@jatin-bhateja
Copy link
Member

@jatin-bhateja jatin-bhateja commented May 29, 2024

Re-instantiating the ClearArray opcode check in match_rule_supported_vector, this caused performance regressions in some worklets in Renaissance BM since it prevented small sized instance initialization using quadword stores which showed better performance on non-AVX512 targets.

Our intent was to save code bloating due to long sequences of quadword store with large InitArrayShortSize value to prevent any side effects on in-lining decisions. Performance of an existing Benchmark does not show much performance variation.

Baseline with -XX:InitArrayShortSize=100000000

Benchmark                        Mode  Cnt          Score   Error  Units
ClearMemory.testClearMemory16K  thrpt    2    2695259.360          ops/s
ClearMemory.testClearMemory1K   thrpt    2   48622330.474          ops/s
ClearMemory.testClearMemory1M   thrpt    2      79546.779          ops/s
ClearMemory.testClearMemory24B  thrpt    2  252740278.617          ops/s
ClearMemory.testClearMemory2K   thrpt    2   24781443.547          ops/s
ClearMemory.testClearMemory32B  thrpt    2  251588987.342          ops/s
ClearMemory.testClearMemory32K  thrpt    2    1487427.378          ops/s
ClearMemory.testClearMemory40B  thrpt    2  213856093.091          ops/s
ClearMemory.testClearMemory48B  thrpt    2  193701317.101          ops/s
ClearMemory.testClearMemory4K   thrpt    2   11961450.919          ops/s
ClearMemory.testClearMemory56B  thrpt    2  169003238.018          ops/s
ClearMemory.testClearMemory8K   thrpt    2    5871416.239          ops/s
ClearMemory.testClearMemory8M   thrpt    2      10663.044          ops/s


With patch and -XX:InitArrayShortSize=100000000

Benchmark                        Mode  Cnt          Score   Error  Units
ClearMemory.testClearMemory16K  thrpt    2    3147203.987          ops/s
ClearMemory.testClearMemory1K   thrpt    2   48225184.981          ops/s
ClearMemory.testClearMemory1M   thrpt    2      80016.400           ops/s
ClearMemory.testClearMemory24B  thrpt    2  253904943.981          ops/s
ClearMemory.testClearMemory2K   thrpt    2   24664594.490          ops/s
ClearMemory.testClearMemory32B  thrpt    2  255507231.954          ops/s
ClearMemory.testClearMemory32K  thrpt    2    1636220.531          ops/s
ClearMemory.testClearMemory40B  thrpt    2  220718255.832          ops/s
ClearMemory.testClearMemory48B  thrpt    2  196294911.715          ops/s
ClearMemory.testClearMemory4K   thrpt    2   12182133.488          ops/s
ClearMemory.testClearMemory56B  thrpt    2  168341797.370          ops/s
ClearMemory.testClearMemory8K   thrpt    2    5952488.407          ops/s
ClearMemory.testClearMemory8M   thrpt    2      10604.212          ops/s

java -jar renaissance-jmh-0.15.0-18-g65d596e-SNAPSHOT.jar -jvmArgs "-Xms10g -Xmx10g -Xlog:alloc* -XX:+UnlockDiagnosticVMOptions" -f 1 -i 5 -wi 2 -w 30 org.renaissance.jdk.streams.JmhMnemonics.run

Baseline:-
Benchmark         Mode  Cnt     Score    Error  Units
JmhMnemonics.run    ss    5  3202.478 ± 20.474  ms/op

With Patch:-
Benchmark         Mode  Cnt     Score    Error  Units
JmhMnemonics.run    ss    5  3241.956 ± 17.290  ms/op


Kindly review and share feedback.

Best Regards,
Jatin


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-8332487: Regression in Crypto-AESGCMBench.encrypt (and others) after JDK-8328181 (Bug - P3)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 19447

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented May 29, 2024

👋 Welcome back jbhateja! 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
Copy link

openjdk bot commented May 29, 2024

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

8332487: Regression in Crypto-AESGCMBench.encrypt (and others) after JDK-8328181

Reviewed-by: thartmann

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

  • 32636dc: 8333105: Shenandoah: Results of concurrent mark may be lost for degenerated cycle
  • 7071542: 8331189: Implementation of Scoped Values (Third Preview)
  • 4acafb8: 8333107: javac fails with an exception when processing broken lambda
  • 921860d: 8333264: Remove unused resolve_sub_helper declaration after JDK-8322630
  • 4a20691: 8331876: JFR: Move file read and write events to java.base
  • f608918: 8332614: Type-checked ConstantPool.entryByIndex and ClassReader.readEntryOrNull
  • 1b04f64: 8216984: Deprecate for removal Socket constructors to create UDP sockets
  • 3cff588: 8332826: Make hashCode methods in ArraysSupport friendlier
  • 2b4a4b7: 8326121: vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_inMemoryCompilation_keep_cl failed with Full gc happened. Test was useless.
  • 286cc16: 8327401: Some jtreg tests fail on Wayland without any tracking bug
  • ... and 24 more: https://git.openjdk.org/jdk/compare/da6aa2a86c86ba5fce747b36dcb2d6001cfcc44e...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 rfr Pull request is ready for review label May 29, 2024
@openjdk
Copy link

openjdk bot commented May 29, 2024

@jatin-bhateja 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 May 29, 2024
@mlbridge
Copy link

mlbridge bot commented May 29, 2024

Webrevs

Copy link
Member

@TobiHartmann TobiHartmann 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 and trivial.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label May 30, 2024
@jatin-bhateja
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented May 30, 2024

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

  • 32636dc: 8333105: Shenandoah: Results of concurrent mark may be lost for degenerated cycle
  • 7071542: 8331189: Implementation of Scoped Values (Third Preview)
  • 4acafb8: 8333107: javac fails with an exception when processing broken lambda
  • 921860d: 8333264: Remove unused resolve_sub_helper declaration after JDK-8322630
  • 4a20691: 8331876: JFR: Move file read and write events to java.base
  • f608918: 8332614: Type-checked ConstantPool.entryByIndex and ClassReader.readEntryOrNull
  • 1b04f64: 8216984: Deprecate for removal Socket constructors to create UDP sockets
  • 3cff588: 8332826: Make hashCode methods in ArraysSupport friendlier
  • 2b4a4b7: 8326121: vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_inMemoryCompilation_keep_cl failed with Full gc happened. Test was useless.
  • 286cc16: 8327401: Some jtreg tests fail on Wayland without any tracking bug
  • ... and 24 more: https://git.openjdk.org/jdk/compare/da6aa2a86c86ba5fce747b36dcb2d6001cfcc44e...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented May 30, 2024

@jatin-bhateja Pushed as commit 1d889e5.

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

@jatin-bhateja jatin-bhateja deleted the JDK-8332487 branch August 1, 2024 08:52
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.

2 participants