RFR: 8325482: Test that distinct seeds produce distinct traces for compiler stress flags [v2]

Christian Hagedorn chagedorn at openjdk.org
Mon Aug 4 06:20:56 UTC 2025


On Fri, 1 Aug 2025 11:33:52 GMT, Saranya Natarajan <snatarajan at openjdk.org> wrote:

>> test/hotspot/jtreg/compiler/debug/TestStressDistinctSeed.java line 102:
>> 
>>> 100:                 ccpTraceSet.add(ccpTrace(s));
>>> 101:                 macroExpansionTraceSet.add(macroExpansionTrace(s));
>>> 102:                 macroEliminationTraceSet.add(macroEliminationTrace(s));
>> 
>> A suggestion, do you also want to check here that two runs with the same seed produce the same result to show that different seeds really produce different results due to the seed and not just some indeterminism with the test itself? How long does your test need now and afterwards with a fastdebug build? Maybe we can also lower the number of seeds if it takes too long or only do the equality-test for a single seed.
>
> Thank you for the review.
> 
> This is a very good point. I implemented and tested what you suggested. Below are some numbers that I obtained from running the test `compiler/debug/TestStressDistinctSeed.java` with `jtreg -vt `
> 
> -  **commit 513ab6d322540aaaf5a167cebb30b87736f7cd91 [with no check for same seed -> same trace ]**
> **slowdebug**
>   build: 7.205 seconds
>   driver: 32.111 seconds
> **fastdebug**
>   build: 0.002 seconds
>   driver: 9.102 seconds
> 
> - **commit 7eff4d55024db36b811e4304cf706354e25c8200 [with check for same seed -> same trace and N = 10 ]**
> **slowdebug****
>   build: 7.55 seconds
>   driver: 63.108 seconds
> **fastdebug** 
>   build: 0.0 seconds
>   driver: 16.259 seconds
> 
> - **commit 14617e01a032fe05775eda36f4f3172137ccd2e8 [with check for same seed -> same trace and N = 5 ]
> slowdebug**
>   build: 0.001 seconds
>   driver: 31.946 seconds
> **fastdebug** 
>   build: 0.0 seconds
>   driver: 8.596 seconds
> 
> I think N=5 for the updated test looks reasonable. Do you think this is okay ?

Thanks for the update and the numbers! I agree that `N=5` seems reasonable. Looks good!

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26554#discussion_r2250506280


More information about the hotspot-compiler-dev mailing list