RFR: 8252219: C2: Randomize IGVN worklist for stress testing [v2]

Roberto Castañeda Lozano github.com+8792647+robcasloz at openjdk.java.net
Tue Sep 22 12:44:33 UTC 2020


> Add `StressIGVN` option to let C2 randomize IGVN worklist order. When enabled, the worklist is shuffled before each
> main run of the IGVN loop. Also add `GenerateStressSeed' and 'StressSeed=N` options to randomly generate or specify the
> seed. In either case, the seed is logged if `LogCompilation` is enabled.  The generation or specification of seeds also
> affects the randomization triggered by `StressLCM` and `StressGCM`. The new options are declared as
> production+diagnostic for consistency with these existing options.

Roberto Castañeda Lozano has updated the pull request with a new target base due to a merge or a rebase. The
incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains five
additional commits since the last revision:

 - Apply minor rearrangements to simplify the patch
 - Do not use the per-compilation seed for StressLCM and StressGCM
   
   Use global seed for StressLCM and StressGCM as before to preserve their behavior
   by now. In the future, these options can also benefit from using the local
   (per-compilation) seed by simply using Compile::random() instead of os::random()
   and extending the Compile constructor accordingly.
 - Merge branch 'master' of github.com:robcasloz/jdk into JDK-8252219
 - Replace global seed with compilation-local seeds for repeatability
   
   Replace usage of global seed for stress testing with a seed per compilation, to
   make stress runs repeatable in the face of concurrent method compilations. This
   affects StressLCM, StressGCM, and StressIGVN. Reuse pseudonumber generation
   logic in os::random_helper.
 - 8252219: C2: Randomize IGVN worklist for stress testing
   
   Add 'StressIGVN' option to let C2 randomize IGVN worklist order. When enabled,
   the worklist is shuffled before each main run of the IGVN loop. Also add
   'GenerateStressSeed' and 'StressSeed=N' options to randomly generate or specify
   the seed. In either case, the seed is logged if 'LogCompilation' is enabled.
   
   The generation or specification of seeds also affects the randomization
   triggered by 'StressLCM' and 'StressGCM'. The new options are declared as
   production+diagnostic for consistency with these existing options.

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/242/files
  - new: https://git.openjdk.java.net/jdk/pull/242/files/2c674fa5..73abfb27

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=242&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=242&range=00-01

  Stats: 8415 lines in 304 files changed: 4786 ins; 2817 del; 812 mod
  Patch: https://git.openjdk.java.net/jdk/pull/242.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/242/head:pull/242

PR: https://git.openjdk.java.net/jdk/pull/242


More information about the hotspot-dev mailing list