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

8277411: C2 fast_unlock intrinsic on AArch64 has unnecessary ownership check #6498

Closed
wants to merge 1 commit into from

Conversation

fisk
Copy link
Contributor

@fisk fisk commented Nov 22, 2021

The AArch64 fast_unlock C2 code checks if the current thread owns the lock. This can be surprisingly expensive in workload where locking is contended. The check is however optional (helpful only for finding JNI code bugs), and indeed not emitted for x86_64. This patch removes the check on AArch64 as well.


Progress

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

Issue

  • JDK-8277411: C2 fast_unlock intrinsic on AArch64 has unnecessary ownership check

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/6498/head:pull/6498
$ git checkout pull/6498

Update a local copy of the PR:
$ git checkout pull/6498
$ git pull https://git.openjdk.java.net/jdk pull/6498/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 6498

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/6498.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 22, 2021

👋 Welcome back eosterlund! 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 22, 2021
@openjdk
Copy link

openjdk bot commented Nov 22, 2021

@fisk 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 22, 2021
@mlbridge
Copy link

mlbridge bot commented Nov 22, 2021

Webrevs

@openjdk
Copy link

openjdk bot commented Nov 24, 2021

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

8277411: C2 fast_unlock intrinsic on AArch64 has unnecessary ownership check

Reviewed-by: ngasson, neliasso

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

  • 040b2c5: 8277139: Improve code readability in PredecessorValidator (c1_IR.cpp)
  • 3e798dd: 8275330: C2: assert(n->is_Root() || n->is_Region() || n->is_Phi() || n->is_MachMerge() || def_block->dominates(block)) failed: uses must be dominated by definitions
  • 99e4bda: 8277417: C1 LIR instruction for load-klass
  • 00a6238: 8277508: need to check has_predicated_vectors before calling scalable_predicate_reg_slots
  • 3383c0d: 8277659: [TESTBUG] Microbenchmark ThreadOnSpinWaitProducerConsumer.java hangs
  • 7e54d06: 8277165: jdeps --multi-release --print-module-deps fails if module-info.class in different versioned directories
  • eb4d886: 8277504: Use String.stripTrailing instead of hand-crafted method in SwingUtilities2
  • 9879920: 8277825: Remove unused ReferenceProcessorPhaseTimes::_sub_phases_total_time_ms
  • f788834: 8277786: G1: Rename log2_card_region_per_heap_region used in G1CardSet
  • 3034ae8: 8277631: ZGC: CriticalMetaspaceAllocation asserts
  • ... and 52 more: https://git.openjdk.java.net/jdk/compare/3f847fe89a088d6921107ca887a7a1bace871bd6...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 24, 2021
Copy link

@neliasso neliasso left a comment

Choose a reason for hiding this comment

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

Approved!

@fisk
Copy link
Contributor Author

fisk commented Nov 26, 2021

Thanks for the reviews @neliasso and @nick-arm!
/integrate

@openjdk
Copy link

openjdk bot commented Nov 26, 2021

Going to push as commit 3d810ad.
Since your change was applied there have been 63 commits pushed to the master branch:

  • ce0234b: 8277860: PPC: Remove duplicate info != NULL check
  • 040b2c5: 8277139: Improve code readability in PredecessorValidator (c1_IR.cpp)
  • 3e798dd: 8275330: C2: assert(n->is_Root() || n->is_Region() || n->is_Phi() || n->is_MachMerge() || def_block->dominates(block)) failed: uses must be dominated by definitions
  • 99e4bda: 8277417: C1 LIR instruction for load-klass
  • 00a6238: 8277508: need to check has_predicated_vectors before calling scalable_predicate_reg_slots
  • 3383c0d: 8277659: [TESTBUG] Microbenchmark ThreadOnSpinWaitProducerConsumer.java hangs
  • 7e54d06: 8277165: jdeps --multi-release --print-module-deps fails if module-info.class in different versioned directories
  • eb4d886: 8277504: Use String.stripTrailing instead of hand-crafted method in SwingUtilities2
  • 9879920: 8277825: Remove unused ReferenceProcessorPhaseTimes::_sub_phases_total_time_ms
  • f788834: 8277786: G1: Rename log2_card_region_per_heap_region used in G1CardSet
  • ... and 53 more: https://git.openjdk.java.net/jdk/compare/3f847fe89a088d6921107ca887a7a1bace871bd6...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Nov 26, 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 labels Nov 26, 2021
@openjdk
Copy link

openjdk bot commented Nov 26, 2021

@fisk Pushed as commit 3d810ad.

💡 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-compiler hotspot-compiler-dev@openjdk.org integrated Pull request has been integrated
3 participants