8311588: C2: RepeatCompilation compiler directive does not choose stress seed randomly

Backport-of: 06a1a15d01
This commit is contained in:
Goetz Lindenmaier
2023-12-30 15:12:11 +00:00
committed by Vitaly Provodin
parent d7f256b88b
commit 8edb40cdb3

View File

@@ -827,7 +827,7 @@ Compile::Compile( ciEnv* ci_env, ciMethod* target, int osr_bci,
// If any phase is randomized for stress testing, seed random number
// generation and log the seed for repeatability.
if (StressLCM || StressGCM || StressIGVN || StressCCP) {
if (FLAG_IS_DEFAULT(StressSeed) || (FLAG_IS_ERGO(StressSeed) && RepeatCompilation)) {
if (FLAG_IS_DEFAULT(StressSeed) || (FLAG_IS_ERGO(StressSeed) && directive->RepeatCompilationOption)) {
_stress_seed = static_cast<uint>(Ticks::now().nanoseconds());
FLAG_SET_ERGO(StressSeed, _stress_seed);
} else {