RFR: 8365262: [IR-Framework] Add simple way to add cross-product of flags [v8]

Emanuel Peter epeter at openjdk.org
Mon Aug 25 15:21:58 UTC 2025


On Fri, 22 Aug 2025 18:09:14 GMT, Manuel Hässig <mhaessig at openjdk.org> wrote:

>> This PR adds the `TestFramework::addCrossProductScenarios` method to enable more ergonomic testing of the combination of all flag combinations. To illustrate its use, I also converted one test to use the new cross product functionality.
>> 
>> Testing:
>>  - [x] Github Actions
>>  - [x] tier1,tier2 plus some internal testing on Oracle supported platforms
>
> Manuel Hässig has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 15 additional commits since the last revision:
> 
>  - Merge branch 'master' into JDK-8365262
>  - Remove excess newline
>  - Fix indentation
>  - Improve comments
>  - Fix copy pasta mistakes
>  - Improvements prompted by Emanuel
>  - Fix test
>  - Better counting in tests
>  - post processing of flags and documentation
>  - Make the test work
>  - ... and 5 more: https://git.openjdk.org/jdk/compare/d9c76256...771924f0

Looks much better already with a few extra comments :)

test/hotspot/jtreg/compiler/lib/ir_framework/TestFramework.java line 380:

> 378:             .reduce(
> 379:                 Stream.of(Collections.<String>emptyList()), // Initialize Stream<List<String>> acc with a Stream containing an empty list of Strings.
> 380:                 (acc, set) ->  // (Stream<List<String>>, Stream<List<String>>) -> Stream<List<String>>

You could probably put the types in the argument capture, no? Then it would become actual code.

test/hotspot/jtreg/compiler/lib/ir_framework/TestFramework.java line 397:

> 395:                      .flatMap(Collection::stream) // Flatten the Stream<List<String>> into Stream<String>>.
> 396:                      .filter(s -> !s.isEmpty()) // Remove empty string flags.
> 397:                      .distinct()

Is this necessary? Could this reorder things? Sometimes order is relevant.

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

PR Comment: https://git.openjdk.org/jdk/pull/26762#issuecomment-3220710336
PR Review Comment: https://git.openjdk.org/jdk/pull/26762#discussion_r2298401628
PR Review Comment: https://git.openjdk.org/jdk/pull/26762#discussion_r2298408374


More information about the hotspot-compiler-dev mailing list