RFR: 8346107: Generators: testing utility for random value generation

Emanuel Peter epeter at openjdk.org
Wed Dec 18 12:09:36 UTC 2024


On Wed, 18 Dec 2024 07:53:12 GMT, theoweidmannoracle <duke at openjdk.org> wrote:

>> For verification testing, it is often critical to generate "interesting" values, to provoke overflows, NaN, etc. And to generate these values in the correct distribution to trigger certain optimizations.
>> 
>> I would like to start a collection of such generators, that can then be used in testing.
>> 
>> The goal is to grow this collection in the future, and add new types. For example `byte`, `char`, `short`, or even `Float16`.
>> 
>> This will be helpful for the Template framework [JDK-8344942](https://bugs.openjdk.org/browse/JDK-8344942), but also other tests.
>> 
>> Related PR, for value verification: https://github.com/openjdk/jdk/pull/22715
>
> test/hotspot/jtreg/compiler/lib/generators/AnyBitsDoubleGenerator.java line 30:
> 
>> 28: 
>> 29: /**
>> 30:  * Provide a any-bits double distribution random generator, i.e. the bits are uniformly sampled,
> 
> Nitpicking: I would suggest "Provides" instead, also below. (See, for example, https://www.oracle.com/uk/technical-resources/articles/java/javadoc-tool.html#styleguide.)

Done

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22716#discussion_r1890131244


More information about the hotspot-compiler-dev mailing list