RFR(S) : 8243431 : use reproducible random in :vmTestbase_vm_metaspace
David Holmes
david.holmes at oracle.com
Fri May 1 02:24:29 UTC 2020
Hi Igor,
tl;dr LGTM! :)
On 1/05/2020 3:13 am, Igor Ignatyev wrote:
> http://cr.openjdk.java.net/~iignatyev/8243431/webrev.00
>> 27 lines changed: 23 ins; 0 del; 4 mod;
>
> Hi all,
>
> could you please review this small patch?
> from JBS:
>> this subtask is to use j.t.l.Utils.getRandomInstance() as a random number generator, where applicable, in : vmTestbase_vm_metaspace test group and marking the tests which make use of "randomness" with a proper k/w.
Okay so three kinds of changes here:
- trivial addition of randomness keyword
- use of getRandomInstance() where applicable
- broader changes to introduce reproducability
The last one threw me a bit as it wasn't expected from your summary. So
looking at:
vmTestbase/metaspace/stressDictionary/StressDictionary.java
This test already uses a Random instance with a well-defined seed for
reproducability. The problem is that is used by multiple threads so
their own uses are non-deterministic due to scheduling. Hence you have
now created a random instance per worker thread, seed from the shared
Random instance. Okay - makes sense.
Thanks,
David
> testing: : vmTestbase_vm_metaspace test group
> JBS: https://bugs.openjdk.java.net/browse/JDK-8243431
> webrevs:
> - code changes: http://cr.openjdk.java.net/~iignatyev//8243431/webrev.00.code
>> 7 lines changed: 5 ins; 0 del; 2 mod;
> - adding k/w: http://cr.openjdk.java.net/~iignatyev//8243431/webrev.00.kw
>> 18 lines changed: 18 ins; 0 del; 0 mod;
> - full: http://cr.openjdk.java.net/~iignatyev//8243431/webrev.00
>> 27 lines changed: 23 ins; 0 del; 4 mod;
>
> Thanks,
> -- Igor
>
More information about the hotspot-runtime-dev
mailing list