Skip to content

Conversation

@vpa1977
Copy link
Contributor

@vpa1977 vpa1977 commented Oct 16, 2025

This PR fixes typo in src/hotspot/cpu/s390/gc/g1/g1_s390.ad that caused compareAndExchange return expected value instead of old value when compareAndExchange failed.
It updates jtreg test to include negative tests for compareAndExchange and compareAndSwap g1 barriers.

Testing (s390x) :

==============================
Test summary
==============================
   TEST                                              TOTAL  PASS  FAIL ERROR  SKIP   
   jtreg:test/hotspot/jtreg/compiler/gcbarriers/TestG1BarrierGeneration.java
                                                         1     1     0     0     0   
==============================
TEST SUCCESS

Tier1 summary:

==============================
Test summary
==============================
   TEST                                              TOTAL  PASS  FAIL ERROR  SKIP   
   jtreg:test/hotspot/jtreg:tier1                     3118  2466     0     0   652   
   jtreg:test/jdk:tier1                               2518  2418     0     0   100   
   jtreg:test/langtools:tier1                         4672  4662     0     0    10   
   jtreg:test/jaxp:tier1                                 0     0     0     0     0   
   jtreg:test/lib-test:tier1                            38    38     0     0     0   
==============================
TEST SUCCESS

Tier 2 tests contain unrelated failures:

==============================
Test summary
==============================
   TEST                                              TOTAL  PASS  FAIL ERROR  SKIP   
>> jtreg:test/hotspot/jtreg:tier2                      960   766     1     0   193 <<
>> jtreg:test/jdk:tier2                               4455  4203     5     0   247 <<
   jtreg:test/langtools:tier2                           14    12     0     0     2   
   jtreg:test/jaxp:tier2                               517   516     0     0     1   
   jtreg:test/docs:tier2                                 4     0     0     0     4   
==============================
TEST FAILURE

jtreg:test/hotspot/jtreg:tier2:

  1. applications/ctw/modules/jdk_jfr.java Failed. Execution failed: `main' threw exception: java.lang.AssertionError: There were 1 errors:[{modules_jdk_jfr_0: failed during compilation of class #226 : jdk/jfr/internal/jfc/JFC}] - existing issue https://bugs.openjdk.org/browse/JDK-8352567

jtreg:test/jdk:tier2:

  1. java/net/Inet6Address/B6206527.java Failed. Execution failed: `main' threw exception: java.net.SocketException: Duplicate link local addresses: must specify scope-id
  2. java/net/Inet6Address/Scoping.java Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Failed: /[fe80:0:0:0:ca:9ff:fe00:6d0c]:0count: 0
  3. java/net/NetworkInterface/UniqueMacAddressesTest.java Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: mac address uniqueness test failed
  4. tools/launcher/HelpFlagsTest.java Failed. Execution failed: `main' threw exception: java.lang.AssertionError: HelpFlagsTest failed: Tool jrunscript not covered by this test. Add specification to jdkTools array!
  5. tools/launcher/VersionCheck.java Failed. Execution failed: `main' threw exception: java.lang.AssertionError: VersionCheck failed: testToolVersion: [jrunscript];

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-8370049: [s390x] G1 barrier compareAndExchange does not return old value when compareExchange fails (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 27857

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 16, 2025

👋 Welcome back vpetko! 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 Oct 16, 2025

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

8370049: [s390x] G1 barrier compareAndExchange does not return old value when compareExchange fails

Reviewed-by: amitkumar, aph, rcastanedalo

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 19 new commits pushed to 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.

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 (@offamitkumar, @theRealAph, @robcasloz) 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
Copy link

openjdk bot commented Oct 16, 2025

@vpa1977 The following label will be automatically applied to this pull request:

  • hotspot

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.

@vpa1977 vpa1977 changed the title 8370049: G1 barrier compareAndExchange does not return old value when compareExchange fails 8370049: [s390x] G1 barrier compareAndExchange does not return old value when compareExchange fails Oct 16, 2025
@openjdk openjdk bot changed the title 8370049: [s390x] G1 barrier compareAndExchange does not return old value when compareExchange fails 8370049: [s390x] G1 barrier compareAndExchange does not return old value when compareExchange fails Oct 16, 2025
@vpa1977 vpa1977 marked this pull request as ready for review October 17, 2025 01:50
@openjdk openjdk bot added the rfr Pull request is ready for review label Oct 17, 2025
@mlbridge
Copy link

mlbridge bot commented Oct 17, 2025

Webrevs

Copy link
Member

@offamitkumar offamitkumar left a comment

Choose a reason for hiding this comment

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

Thank you so much for fixing this. I am surprised that it survived this long.

Copy link
Contributor

@theRealAph theRealAph left a comment

Choose a reason for hiding this comment

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

Good.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Oct 17, 2025
@robcasloz
Copy link
Contributor

Hi Vladimir, I just submitted some Oracle-internal testing to check that the test changes work on other platforms, will come back with the results later today or on Monday the latest, please wait for integration until then.

Copy link
Contributor

@robcasloz robcasloz left a comment

Choose a reason for hiding this comment

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

Test results look good!

@vpa1977
Copy link
Contributor Author

vpa1977 commented Oct 17, 2025

/integrate

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

openjdk bot commented Oct 17, 2025

@vpa1977
Your change (at version 38f55c4) is now ready to be sponsored by a Committer.

@adinn
Copy link
Contributor

adinn commented Oct 20, 2025

/sponsor

@openjdk
Copy link

openjdk bot commented Oct 20, 2025

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

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Oct 20, 2025
@openjdk openjdk bot closed this Oct 20, 2025
@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 Oct 20, 2025
@openjdk
Copy link

openjdk bot commented Oct 20, 2025

@adinn @vpa1977 Pushed as commit 5609ee1.

💡 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 [email protected] integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

5 participants