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

Tobias Hartmann thartmann at openjdk.java.net
Wed Sep 23 11:44:10 UTC 2020


On Tue, 22 Sep 2020 19:27:20 GMT, Roberto Castañeda Lozano <github.com+8792647+robcasloz at openjdk.org> wrote:

>> 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 new options are declared as
>> production+diagnostic for consistency with the existing `StressLCM` and `StressGCM` options.
>
> Roberto Castañeda Lozano has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Define 'StressSeed' option as 'uint' rather than 'uintx'

We should think about adding the Stress* flags to some tier in the CI.

src/hotspot/share/opto/c2_globals.hpp line 55:

> 53:           "Randomize worklist traversal in IGVN")                           \
> 54:                                                                             \
> 55:   product(bool, GenerateStressSeed, false, DIAGNOSTIC,                      \

Is this flag really required? We could simply generate the seed if StressSeed has not been specified on the command
line (see `FLAG_IS_DEFAULT` macro).

src/hotspot/share/opto/node.cpp line 2333:

> 2331:
> 2332: //-----------------------------------------------------------------------------
> 2333: void Node_Array::swap(uint i, uint j) {

You can use the swap method from globalDefinitions.hpp.

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

Changes requested by thartmann (Reviewer).

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


More information about the hotspot-compiler-dev mailing list