Skip to content

8345179: RISC-V: Add gtests for weak cmpxchg #22476

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

Closed
wants to merge 6 commits into from

Conversation

robehn
Copy link
Contributor

@robehn robehn commented Dec 2, 2024

Hi, please consider.

This adds tests of aligned weak narrow cmpxchg.

[ RUN      ] RiscV.cmpxchg_weak_int16_lr_sc_vm
[       OK ] RiscV.cmpxchg_weak_int16_lr_sc_vm (2 ms)
[ RUN      ] RiscV.cmpxchg_weak_int8_lr_sc_vm
[       OK ] RiscV.cmpxchg_weak_int8_lr_sc_vm (0 ms)
[ RUN      ] RiscV.cmpxchg_weak_int16_maybe_zacas_vm
[       OK ] RiscV.cmpxchg_weak_int16_maybe_zacas_vm (0 ms)
[ RUN      ] RiscV.cmpxchg_weak_int8_maybe_zacas_vm
[       OK ] RiscV.cmpxchg_weak_int8_maybe_zacas_vm (0 ms)
[----------] 4 tests from RiscV (20997 ms total)

Executed with -XX:+UnlockExperimentalVMOptions -XX:+UseZacas

Thanks, Robbin


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-8345179: RISC-V: Add gtests for weak cmpxchg (Sub-task - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 22476

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 2, 2024

👋 Welcome back rehn! 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 Dec 2, 2024

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

8345179: RISC-V: Add gtests for weak cmpxchg

Reviewed-by: fyang, mli

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

  • 7c8cec1: 8345224: Test runtime/cds/appcds/applications/JavacBench.java#dynamic fails after JDK-8344822
  • 77cfcee: 8345422: Fix JNI Checker "in native method" warnings in the debug agent and debugger tests
  • 67a7b00: 8345355: [s390x] support for z16 hardware
  • 9c3d3b9: 8345503: Test EnableNativeAccessCDS.java fails with TEST_THREAD_FACTORY=Virtual
  • fb95a53: 8345533: Switch ML-DSA implementation to FIPS 204 final
  • 63d0951: 8345153: Clean up SecurityManager references from jdk.compiler module
  • 7a0cc79: 8345438: Invalid error for return in early construction context lambda
  • bcebb0c: 8341495: JShell crashes with java.util.MissingFormatArgumentException
  • ba158ed: 8334319: Missing keys in jpackage resource bundle
  • 8a3c100: 8344461: Additional cleanup in NewThreadAction
  • ... and 32 more: https://git.openjdk.org/jdk/compare/9e2b66fb0f2b86d2c70b8ec5cce2eab123c7a9c1...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 Dec 2, 2024
@openjdk
Copy link

openjdk bot commented Dec 2, 2024

@robehn To determine the appropriate audience for reviewing this pull request, one or more labels corresponding to different subsystems will normally be applied automatically. However, no automatic labelling rule matches the changes in this pull request. In order to have an "RFR" email sent to the correct mailing list, you will need to add one or more applicable labels manually using the /label pull request command.

Applicable Labels
  • build
  • client
  • compiler
  • core-libs
  • graal
  • hotspot
  • hotspot-compiler
  • hotspot-gc
  • hotspot-jfr
  • hotspot-runtime
  • i18n
  • ide-support
  • javadoc
  • jdk
  • jmx
  • kulla
  • net
  • nio
  • security
  • serviceability
  • shenandoah

@RealFYang
Copy link
Member

RealFYang commented Dec 2, 2024

Hi, Seems this only covers MacroAssembler::weak_cmpxchg_narrow_value. Are we going to add testing for this one: MacroAssembler::cmpxchg_weak?

@robehn
Copy link
Contributor Author

robehn commented Dec 2, 2024

Hi, Seems this only covers MacroAssembler::weak_cmpxchg_narrow_value. Are we going to add testing for this one: MacroAssembler::cmpxchg_weak?

As the Zacas is the same as normal cmpxchg and the lr/sc just changes the loop to failure it wasn't my focus.

I can add it if you want, to this PR or a later.

EDIT: added it

@robehn
Copy link
Contributor Author

robehn commented Dec 2, 2024

/label add hotspot

@openjdk openjdk bot added the hotspot hotspot-dev@openjdk.org label Dec 2, 2024
@openjdk
Copy link

openjdk bot commented Dec 2, 2024

@robehn
The hotspot label was successfully added.

@mlbridge
Copy link

mlbridge bot commented Dec 2, 2024

Webrevs

@openjdk
Copy link

openjdk bot commented Dec 2, 2024

@robehn this pull request can not be integrated into master due to one or more merge conflicts. To resolve these merge conflicts and update this pull request you can run the following commands in the local repository for your personal fork:

git checkout weak_narrow
git fetch https://git.openjdk.org/jdk.git master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push

@openjdk openjdk bot added the merge-conflict Pull request has merge conflict with target branch label Dec 2, 2024
@openjdk openjdk bot removed the merge-conflict Pull request has merge conflict with target branch label Dec 2, 2024
@openjdk openjdk bot removed the rfr Pull request is ready for review label Dec 2, 2024
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.

Thanks for the update. BTW: You need to fix the trailing whitespace issue reported by jcheck.

@openjdk openjdk bot added the rfr Pull request is ready for review label Dec 3, 2024
Copy link

@Hamlin-Li Hamlin-Li 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, thanks for adding the tests.
Just one minor comment.

@RealFYang
Copy link
Member

RealFYang commented Dec 4, 2024

Hi, Please merge with latest jdk master as #22505 has been integrated.

Copy link

@Hamlin-Li Hamlin-Li left a comment

Choose a reason for hiding this comment

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

Thanks for updating, looks good.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Dec 4, 2024
@robehn
Copy link
Contributor Author

robehn commented Dec 5, 2024

Thanks!

@robehn
Copy link
Contributor Author

robehn commented Dec 5, 2024

/integrate

@openjdk
Copy link

openjdk bot commented Dec 5, 2024

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

  • 7c8cec1: 8345224: Test runtime/cds/appcds/applications/JavacBench.java#dynamic fails after JDK-8344822
  • 77cfcee: 8345422: Fix JNI Checker "in native method" warnings in the debug agent and debugger tests
  • 67a7b00: 8345355: [s390x] support for z16 hardware
  • 9c3d3b9: 8345503: Test EnableNativeAccessCDS.java fails with TEST_THREAD_FACTORY=Virtual
  • fb95a53: 8345533: Switch ML-DSA implementation to FIPS 204 final
  • 63d0951: 8345153: Clean up SecurityManager references from jdk.compiler module
  • 7a0cc79: 8345438: Invalid error for return in early construction context lambda
  • bcebb0c: 8341495: JShell crashes with java.util.MissingFormatArgumentException
  • ba158ed: 8334319: Missing keys in jpackage resource bundle
  • 8a3c100: 8344461: Additional cleanup in NewThreadAction
  • ... and 32 more: https://git.openjdk.org/jdk/compare/9e2b66fb0f2b86d2c70b8ec5cce2eab123c7a9c1...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Dec 5, 2024

@robehn Pushed as commit 2331782.

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

@robehn robehn deleted the weak_narrow branch December 5, 2024 07:52
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
Development

Successfully merging this pull request may close these issues.

3 participants