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

8277431: riscv: Intrinsify recursive ObjectMonitor locking for C2 #13

Closed

Conversation

yadongw
Copy link
Collaborator

@yadongw yadongw commented Nov 23, 2021

According to https://bugs.openjdk.java.net/browse/JDK-8277180, the C2 fast_lock and fast_unlock intrinsics don't support recursive ObjectMonitor locking. Some workload can significantly benefit from this. This fixes the problem on riscv.

Tier1 tests of hotspot and jdk are passed on unmatched and all JTreg tests are tested on qemu without new failures.

The original performance regression after JDK-8253064 was resolved by this intrinsic.
The benchmark ran on unmatched:

dacapo-9.12-MR1-bach.jar h2 -s huge -t 1 -n 1

Non-intrisified recursive fast_lock/fast_unlock:
===== DaCapo 9.12-MR1 h2 PASSED in 2614652 msec =====
Intrisified recursive fast_lock/fast_unlock:
===== DaCapo 9.12-MR1 h2 PASSED in 2027247 msec =====


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8277431: riscv: Intrinsify recursive ObjectMonitor locking for C2

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/riscv-port pull/13/head:pull/13
$ git checkout pull/13

Update a local copy of the PR:
$ git checkout pull/13
$ git pull https://git.openjdk.java.net/riscv-port pull/13/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 13

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/riscv-port/pull/13.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 23, 2021

👋 Welcome back yadongwang! A progress list of the required criteria for merging this PR into riscv-port 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, 2021
@mlbridge
Copy link

mlbridge bot commented Nov 23, 2021

Webrevs

@RealFYang
Copy link
Member

It would be interesting to know how this may affect performance on riscv. Maybe we can try DaCapo h2 to see.

@yadongw
Copy link
Collaborator Author

yadongw commented Nov 23, 2021

It would be interesting to know how this may affect performance on riscv. Maybe we can try DaCapo h2 to see.

DaCapo results are updated.

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.

The performance numbers looks great. Thanks.

@openjdk
Copy link

openjdk bot commented Nov 23, 2021

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

8277431: riscv: Intrinsify recursive ObjectMonitor locking for C2

Reviewed-by: fyang

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 1 new commit pushed to the riscv-port branch:

  • 7cf6b9d: 8277391: riscv: Remove the USE_LIBRARY_BASED_TLS_ONLY macro to use tls instead of pthread_getspecific

Please see this link for an up-to-date comparison between the source branch of this pull request and the riscv-port 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.

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 (@RealFYang) 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 added the ready Pull request is ready to be integrated label Nov 23, 2021
@yadongw
Copy link
Collaborator Author

yadongw commented Nov 23, 2021

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Nov 23, 2021
@openjdk
Copy link

openjdk bot commented Nov 23, 2021

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

@RealFYang
Copy link
Member

/sponsor

@openjdk
Copy link

openjdk bot commented Nov 23, 2021

Going to push as commit a319e9a.
Since your change was applied there has been 1 commit pushed to the riscv-port branch:

  • 7cf6b9d: 8277391: riscv: Remove the USE_LIBRARY_BASED_TLS_ONLY macro to use tls instead of pthread_getspecific

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Nov 23, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and 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 Nov 23, 2021
@openjdk
Copy link

openjdk bot commented Nov 23, 2021

@RealFYang @yadongw Pushed as commit a319e9a.

💡 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
integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

2 participants