Integrated: 8301584: Generational ZGC: Add barrier elision tests

Roberto Castañeda Lozano rcastanedalo at openjdk.org
Thu Feb 9 08:17:10 UTC 2023


On Fri, 3 Feb 2023 15:19:48 GMT, Roberto Castañeda Lozano <rcastanedalo at openjdk.org> wrote:

> This changeset adds test cases exercising C2's barrier elision on combinations of different
> 
> - pairs of dominating / dominated accesses (allocations, loads, stores, atomic operations),
> - control structures (local, conditions, loops),
> - object types (arrays, class instances), and
> - levels of information available during C2's analysis (known vs. unknown array indices).
> 
> The changeset exposes node barrier data to the [IR test framework](https://github.com/openjdk/jdk/blob/master/test/hotspot/jtreg/compiler/lib/ir_framework/README.md) by including it in the node's dump output. This extension is useful not just for testing but also for debugging purposes, for example when exploring C2's intermediate representation with IGV:
> 
> ![igv](https://user-images.githubusercontent.com/8792647/216639224-aa288dd8-72cc-43a5-a445-a93d65004dac.png)
> 
> The following tests illustrate a missing optimization in C2's barrier elision (reported in [JDK-8301769](https://bugs.openjdk.org/browse/JDK-8301769)), where barriers that should be elided are not:
> 
> - `testStoreThenAtomic`
> - `testAtomicThenLoad`
> - `testAtomicThenStore`
> - `testAtomicThenAtomic`
> 
> The changeset does not contain IR checks expecting elision in these cases, to reduce CI pipeline noise. The tests are restricted by now to x64, since volatile loads and stores in other platforms suffer from the same issue (see [JDK-8301769](https://bugs.openjdk.org/browse/JDK-8301769)).
> 
> **Testing:** tier1-7 (windows-x64, linux-x64, macosx-x64; release and debug mode)

This pull request has now been integrated.

Changeset: c7a20016
Author:    Roberto Castañeda Lozano <rcastanedalo at openjdk.org>
URL:       https://git.openjdk.org/zgc/commit/c7a200169c0aeb4a86bcdd08fa814efd1fb6de44
Stats:     421 lines in 6 files changed: 418 ins; 0 del; 3 mod

8301584: Generational ZGC: Add barrier elision tests

Reviewed-by: eosterlund, aboldtch

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

PR: https://git.openjdk.org/zgc/pull/12


More information about the zgc-dev mailing list