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

8252857: AArch64: Shenandoah C1 CAS is not sequentially consistent #289

Closed
wants to merge 2 commits into from

Conversation

shipilev
Copy link
Member

@shipilev shipilev commented Aug 24, 2021

Unclean backport to fix Shenandoah AArch64 bug. The patch does not apply cleanly, because there is a trivial conflict in a copyright line. Then it fails to build, because the check in LIR_OpShenandoahCompareAndSwap::emit_code should match the 11u version.

In JDK mainline:

void LIRGenerator::volatile_field_load(LIR_Address* address, LIR_Opr result, * info) {
  ....
  if (!CompilerConfig::is_c1_only_no_jvmci()) {
    __ membar();
  }
  __ volatile_load_mem_reg(address, result, info);
}
...
void LIR_OpShenandoahCompareAndSwap::emit_code(LIR_Assembler* masm) {
  ...
  if (CompilerConfig::is_c1_only_no_jvmci()) {
    ...
    __ membar(__ AnyAny);
  }
}

In JDK 11u (this PR):

void LIRGenerator::volatile_field_load(LIR_Address* address, LIR_Opr result,
                                       CodeEmitInfo* info) {
  ...
  if (! UseBarriersForVolatile) {
    __ membar();
  }
   __ volatile_load_mem_reg(address, result, info);
}

void LIR_OpShenandoahCompareAndSwap::emit_code(LIR_Assembler* masm) {
  ...
  if (UseBarriersForVolatile) {
     ...
     __ membar(__ AnyAny);
  }
}

Additional testing:

  • Linux AArch64 hotspot_gc_shenandoah
  • Linux AArch64 tier1 with -XX:+UseShenandoahGC
  • Linux AArch64 tier2 with -XX:+UseShenandoahGC
  • Linux AArch64 jcstress -m quick with -XX:+UseShenandoahGC

Progress

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

Issue

  • JDK-8252857: AArch64: Shenandoah C1 CAS is not sequentially consistent

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk11u-dev pull/289/head:pull/289
$ git checkout pull/289

Update a local copy of the PR:
$ git checkout pull/289
$ git pull https://git.openjdk.java.net/jdk11u-dev pull/289/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 289

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk11u-dev/pull/289.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Aug 24, 2021

👋 Welcome back shade! 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 changed the title Backport 8e87d46f41e663f5d0506554054417e3049175e7 8252857: AArch64: Shenandoah C1 CAS is not sequentially consistent Aug 24, 2021
@openjdk
Copy link

openjdk bot commented Aug 24, 2021

This backport pull request has now been updated with issue from the original commit.

@openjdk openjdk bot added the backport label Aug 24, 2021
@shipilev shipilev marked this pull request as ready for review Aug 24, 2021
@openjdk openjdk bot added the rfr Pull request is ready for review label Aug 24, 2021
@mlbridge
Copy link

mlbridge bot commented Aug 24, 2021

Webrevs

Copy link
Contributor

@rkennke rkennke left a comment

Looks good! Thanks!

@openjdk
Copy link

openjdk bot commented Aug 25, 2021

@shipilev This change now passes all automated pre-integration checks.

After integration, the commit message for the final commit will be:

8252857: AArch64: Shenandoah C1 CAS is not sequentially consistent

Reviewed-by: rkennke, clanger

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

  • 09f3707: 8261846: [JVMCI] c2v_iterateFrames can get out of sync with the StackFrameStream
  • 1f6eb0f: 8264016: [JVMCI] add some thread local fields for use by JVMCI
  • 3bc2275: 8263776: [JVMCI] add helper to perform Java upcalls
  • 7539e75: 8272700: [macos] Build failure with Xcode 13.0 after JDK-8264848
  • c55b1e5: 8213718: [TEST] Wrong classname in vmTestbase/nsk/stress/except/except002 and except003

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

➡️ 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 Aug 25, 2021
@shipilev
Copy link
Member Author

shipilev commented Aug 25, 2021

Got the push approval.

/integrate

@openjdk
Copy link

openjdk bot commented Aug 25, 2021

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

  • 09f3707: 8261846: [JVMCI] c2v_iterateFrames can get out of sync with the StackFrameStream
  • 1f6eb0f: 8264016: [JVMCI] add some thread local fields for use by JVMCI
  • 3bc2275: 8263776: [JVMCI] add helper to perform Java upcalls
  • 7539e75: 8272700: [macos] Build failure with Xcode 13.0 after JDK-8264848
  • c55b1e5: 8213718: [TEST] Wrong classname in vmTestbase/nsk/stress/except/except002 and except003

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Aug 25, 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 Aug 25, 2021
@openjdk
Copy link

openjdk bot commented Aug 25, 2021

@shipilev Pushed as commit 7cafcf4.

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

@shipilev shipilev deleted the JDK-8252857 branch Aug 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport integrated Pull request has been integrated
3 participants