Integrated: 8325482: Test that distinct seeds produce distinct traces for compiler stress flags

Saranya Natarajan snatarajan at openjdk.org
Tue Aug 5 08:43:12 UTC 2025


On Wed, 30 Jul 2025 13:38:37 GMT, Saranya Natarajan <snatarajan at openjdk.org> wrote:

> 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.

This pull request has now been integrated.

Changeset: d25b9bef
Author:    Saranya Natarajan <snatarajan at openjdk.org>
Committer: Damon Fenacci <dfenacci at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/d25b9befe0a462b9785502806ad14e0a5f6b4320
Stats:     142 lines in 2 files changed: 141 ins; 0 del; 1 mod

8325482: Test that distinct seeds produce distinct traces for compiler stress flags

Reviewed-by: chagedorn, dfenacci

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

PR: https://git.openjdk.org/jdk/pull/26554


More information about the hotspot-compiler-dev mailing list