[jdk17u-dev] RFR: 8311588: C2: RepeatCompilation compiler directive does not choose stress seed randomly

Elif Aslan duke at openjdk.org
Wed Nov 12 00:09:42 UTC 2025


Clean backport to make JDK-8319879 backporting cleaner. The compiler directive RepeatCompilation can be used to repeat compilations of specific methods, for example for Test::test():

-XX:CompileCommand=RepeatCompilation,Test::test,1000

When using this compiler directive in combination with StressIGVN/CCP/GCM/LCM, C2 only sets the stress seed once to a random value. Afterward, it keeps the seed for all repeated compilations. This should be changed to always select a random seed with each repetition (i.e. get the same behavior as the flag RepeatCompilation).

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

Commit messages:
 - Backport 3465179458d844fec4d0496aa3d0c31b34c4c345

Changes: https://git.openjdk.org/jdk17u-dev/pull/4172/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk17u-dev&pr=4172&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8311588
  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk17u-dev/pull/4172.diff
  Fetch: git fetch https://git.openjdk.org/jdk17u-dev.git pull/4172/head:pull/4172

PR: https://git.openjdk.org/jdk17u-dev/pull/4172


More information about the jdk-updates-dev mailing list