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

Saranya Natarajan snatarajan at openjdk.org
Fri Aug 1 11:36:58 UTC 2025


On Thu, 31 Jul 2025 07:32:28 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:

>> 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
>
> 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 very good point. I agree with you regarding checking that the same seed produces same traces. I implemented and tested what you suggested. Below are some numbers that I obtained from running the test with `jtreg -vt `

commit #26554 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 #26554 7eff4d55024db36b811e4304cf706354e25c8200 [with check for same seed -> same trace and N = 10 ]
slowdebug

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

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


More information about the hotspot-compiler-dev mailing list