RFR: 8325482: Test that distinct seeds produce distinct traces for compiler stress flags [v2]
Saranya Natarajan
snatarajan at openjdk.org
Fri Aug 1 11:30:13 UTC 2025
> The existing test (`compiler/debug/TestStress.java`) verifies that compiler stress options produce consistent traces when using the same seed. However, there is currently no test to ensure that different seeds result in different traces.
>
> ### Solution
> Added a test case to assess the distinctness of traces generated from different seeds. This fix addresses the fragility concern highlighted in [JDK-8325482](https://bugs.openjdk.org/browse/JDK-8325482) by verifying that traces produced using N (in this case 10) distinct seeds are all not identical.
>
> ### Changes to `compiler/debug/TestStress.java`
> While investigating this issue, I observed that in `compiler/debug/TestStress.java`, the stress options for macro expansion and macro elimination were not being triggered because there were fewer than 2 macro nodes. Note that the `shuffle_macro_nodes()` in` compile.cpp` is only meaningful when there are more than two macro nodes. The generated traces for macro expansion and macro elimination in `TestStress.java` were empty. I have proposed changes to address this problem.
Saranya Natarajan has updated the pull request incrementally with two additional commits since the last revision:
- changing N to 5
- Adding test for same seed --> same result for N = 10
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/26554/files
- new: https://git.openjdk.org/jdk/pull/26554/files/513ab6d3..14617e01
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=26554&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=26554&range=00-01
Stats: 29 lines in 1 file changed: 16 ins; 1 del; 12 mod
Patch: https://git.openjdk.org/jdk/pull/26554.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/26554/head:pull/26554
PR: https://git.openjdk.org/jdk/pull/26554
More information about the hotspot-compiler-dev
mailing list