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

Roberto Castañeda Lozano rcastanedalo at openjdk.org
Fri Oct 17 08:48:02 UTC 2025


On Thu, 16 Oct 2025 22:55:56 GMT, Vladimir Petko <vpetko at openjdk.org> wrote:

> 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                                                                  ...

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.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/27857#issuecomment-3414477649


More information about the hotspot-dev mailing list