[lworld] Integrated: 8343420: [lworld] compiler/gcbarriers/TestG1BarrierGeneration.java after merging JDK-8334060 in jdk-24+18

Damon Fenacci dfenacci at openjdk.org
Thu May 22 06:48:03 UTC 2025


On Mon, 19 May 2025 11:00:19 GMT, Damon Fenacci <dfenacci at openjdk.org> wrote:

> `TestG1BarrierGeneration.testGetAndSet*` tests fail after [JDK-8351569](https://bugs.openjdk.org/browse/JDK-8351569). These tests check that `VarHandle::getAndSet` with G1 a particular `GetAndSetP` or `GetAndSetN` node is created with a barrier before and after.
> [JDK-8351569](https://bugs.openjdk.org/browse/JDK-8351569) refactored `Unsafe::getAndSet` (which is used by `VarHandle::getAndSet`) to take value-classes into account, which implies that checks must be introduced to see if the target and argument objects are value-classes. This is done with a new overloaded `getAndSet` method that is now called instead of the old one. This method is not intrinsified (only inlined) and doesn't result in a `GetAndSet` node. It instead relies on the `compareAndSet` method (which gets intrinsified) and results in a `CompareAndSwap` node.
> 
> As the goal of the test is mainly to check for G1 barrier creation, the sensible fix for now seems to be to modify the `TestG1BarrierGeneration.testGetAndSet*` tests to make them check for `CompareAndSwap` instead of `GetAndSet` nodes.

This pull request has now been integrated.

Changeset: 5fb6b8e0
Author:    Damon Fenacci <dfenacci at openjdk.org>
Committer: Tobias Hartmann <thartmann at openjdk.org>
URL:       https://git.openjdk.org/valhalla/commit/5fb6b8e05e4717b2dd4e8ca99d87a44b166683d9
Stats:     17 lines in 2 files changed: 0 ins; 1 del; 16 mod

8343420: [lworld] compiler/gcbarriers/TestG1BarrierGeneration.java after merging JDK-8334060 in jdk-24+18

Reviewed-by: thartmann

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

PR: https://git.openjdk.org/valhalla/pull/1462


More information about the valhalla-dev mailing list