RFR: 8301584: Generational ZGC: Add barrier elision tests [v2]
Roberto Castañeda Lozano
rcastanedalo at openjdk.org
Wed Feb 8 09:05:06 UTC 2023
> 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:
>
> 
>
> 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)
Roberto Castañeda Lozano has updated the pull request incrementally with two additional commits since the last revision:
- Add missing include
- Fix include order
-------------
Changes:
- all: https://git.openjdk.org/zgc/pull/12/files
- new: https://git.openjdk.org/zgc/pull/12/files/3a5ef481..27f04950
Webrevs:
- full: https://webrevs.openjdk.org/?repo=zgc&pr=12&range=01
- incr: https://webrevs.openjdk.org/?repo=zgc&pr=12&range=00-01
Stats: 3 lines in 2 files changed: 2 ins; 1 del; 0 mod
Patch: https://git.openjdk.org/zgc/pull/12.diff
Fetch: git fetch https://git.openjdk.org/zgc pull/12/head:pull/12
PR: https://git.openjdk.org/zgc/pull/12
More information about the zgc-dev
mailing list