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 19:42:20 UTC 2020


On Tue, 22 Sep 2020 16:56:46 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>> 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.
>
> src/hotspot/share/opto/compile.cpp line 4456:
> 
>> 4454:
>> 4455: int Compile::random() {
>> 4456:   _stress_seed = os::next_random(_stress_seed);
> 
> I don't see os::next_random() in runtime/os.hpp

It is declared in this PR's version of src/hotspot/share/runtime/os.hpp, line 759:
https://github.com/openjdk/jdk/blob/e11318520bc548fae1a534dccc7e07218279f15b/src/hotspot/share/runtime/os.hpp#L759

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

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


More information about the hotspot-compiler-dev mailing list