Skip to content
Permalink
Browse files
8272703: StressSeed should be set via FLAG_SET_ERGO
Reviewed-by: chagedorn, thartmann
  • Loading branch information
tobiasholenstein authored and TobiHartmann committed Sep 23, 2021
1 parent c434528 commit 66ce09f51eb37029c8ba67a70f8c90a307dae1eb
Showing 1 changed file with 6 additions and 2 deletions.
@@ -773,8 +773,12 @@ 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) {
_stress_seed = FLAG_IS_DEFAULT(StressSeed) ?
static_cast<uint>(Ticks::now().nanoseconds()) : StressSeed;
if (FLAG_IS_DEFAULT(StressSeed) || (FLAG_IS_ERGO(StressSeed) && RepeatCompilation)) {
_stress_seed = static_cast<uint>(Ticks::now().nanoseconds());
FLAG_SET_ERGO(StressSeed, _stress_seed);
} else {
_stress_seed = StressSeed;
}
if (_log != NULL) {
_log->elem("stress_test seed='%u'", _stress_seed);
}

1 comment on commit 66ce09f

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on 66ce09f Sep 23, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.