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

8341481: [perf] vframeStreamCommon constructor may be optimized #22173

Closed
wants to merge 3 commits into from

Conversation

IvaVladimir
Copy link

@IvaVladimir IvaVladimir commented Nov 16, 2024

Optimize constructor to skip extra copy for registers. The tier1 tests are OK. The Specjvm2008 benchmark reports ~1% improvement.


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-8341481: [perf] vframeStreamCommon constructor may be optimized (Enhancement - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 22173

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 16, 2024

👋 Welcome back vaivanov! 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 Nov 16, 2024

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

8341481: [perf] vframeStreamCommon constructor may be optimized

Reviewed-by: sspitsyn

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

  • 03821d9: 8346195: Fix static initialization problem in GDIHashtable
  • a5503fb: 8346432: java.lang.foreign.Linker comment typo
  • fbd76ca: 8337016: serviceability/jvmti/RedefineClasses/RedefineLeakThrowable.java gets Metaspace OOM
  • baeb3d9: 8346304: SA doesn't need a copy of getModifierFlags
  • 99af595: 8345942: Separate source output from class output when building microbenchmarks
  • 8a64595: 8346282: [JVMCI] Add failure reason support to UnresolvedJava/Type/Method/Field
  • 725079b: 8345506: jar --validate may lead to java.nio.file.FileAlreadyExistsException
  • 5e25c48: 8346289: Confusing phrasing in IR Framework README / User-defined Regexes
  • fbbc7c3: 8346120: VirtualThreadPinned event recorded for Object.wait may have wrong duration or may record second event
  • 466c00a: 8346234: javax/swing/text/DefaultEditorKit/4278839/bug4278839.java still fails in CI
  • ... and 43 more: https://git.openjdk.org/jdk/compare/db9eab3f29e9cb26a8c0a7c31c55aaf140f21bed...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 (@sspitsyn) 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 openjdk bot changed the title 8341481 [Perf] vframeStreamCommon constructor may be optimized 8341481: [perf] vframeStreamCommon constructor may be optimized Nov 16, 2024
@openjdk
Copy link

openjdk bot commented Nov 16, 2024

@IvaVladimir The following labels will be automatically applied to this pull request:

  • hotspot
  • serviceability

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added serviceability serviceability-dev@openjdk.org hotspot hotspot-dev@openjdk.org rfr Pull request is ready for review labels Nov 16, 2024
@mlbridge
Copy link

mlbridge bot commented Nov 16, 2024

Webrevs

@dwhite-intel
Copy link

@kimbarrett - Hi! This is the issue with copy constructors that I mentioned in the parking lot a while back.

The existing code for stack walking by vFrames is allocating multiple KB for 2 temporary RegisterMap structs, and copying between them via default copy constructors. The temps are unnecessary.

We believe the performance boost in SPECjbb and SPECjvm:serial are more due to not polluting the L1 cache (improving cache hit rates of other code) than the actual instruction overhead of the copy.

I tried to make the RegisterMap copy constructor private so no one would use it, but there are one or two cases that still use the copy constructor that we didn't have a fix for - maybe you'll see something. Oops, I can't find the examples right off.

@IvaVladimir
Copy link
Author

For the Xeon(R) 6972P scores for the specjvm::serial for current mainline looks as:
orig: 1T - 133.38 ops/m, 192T - 8950.13 ops/m
patched: 1T - 137.85 ops/m; 192T - 9745.03 ops/m

Copy link
Contributor

@sspitsyn sspitsyn 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 to me.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Dec 16, 2024
@IvaVladimir
Copy link
Author

/integrate
Thanks for your review!

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Dec 17, 2024
@openjdk
Copy link

openjdk bot commented Dec 17, 2024

@IvaVladimir
Your change (at version ba234c5) is now ready to be sponsored by a Committer.

@dwhite-intel
Copy link

/sponsor

@openjdk
Copy link

openjdk bot commented Dec 17, 2024

Going to push as commit 4f44cf6.
Since your change was applied there have been 54 commits pushed to the master branch:

  • 390b205: 8346048: test/lib/containers/docker/DockerRunOptions.java uses addJavaOpts() from ctor
  • 03821d9: 8346195: Fix static initialization problem in GDIHashtable
  • a5503fb: 8346432: java.lang.foreign.Linker comment typo
  • fbd76ca: 8337016: serviceability/jvmti/RedefineClasses/RedefineLeakThrowable.java gets Metaspace OOM
  • baeb3d9: 8346304: SA doesn't need a copy of getModifierFlags
  • 99af595: 8345942: Separate source output from class output when building microbenchmarks
  • 8a64595: 8346282: [JVMCI] Add failure reason support to UnresolvedJava/Type/Method/Field
  • 725079b: 8345506: jar --validate may lead to java.nio.file.FileAlreadyExistsException
  • 5e25c48: 8346289: Confusing phrasing in IR Framework README / User-defined Regexes
  • fbbc7c3: 8346120: VirtualThreadPinned event recorded for Object.wait may have wrong duration or may record second event
  • ... and 44 more: https://git.openjdk.org/jdk/compare/db9eab3f29e9cb26a8c0a7c31c55aaf140f21bed...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Dec 17, 2024

@dwhite-intel @IvaVladimir Pushed as commit 4f44cf6.

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

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 serviceability serviceability-dev@openjdk.org
Development

Successfully merging this pull request may close these issues.

3 participants