RFR(T) : 8239500 : jittester shouldn't use System::nanoTime and currentTimeMills in generated code
Igor Ignatyev
igor.ignatyev at oracle.com
Tue Feb 25 19:52:00 UTC 2020
right... I went thru the list of all method of System and identified the following as non-deterministic
+java/lang/System::currentTimeMillis()
+java/lang/System::getProperties()
+java/lang/System::getProperty(Ljava/lang/String;)
+java/lang/System::getProperty(Ljava/lang/String;Ljava/lang/String;)
+java/lang/System::getenv()
+java/lang/System::getenv(Ljava/lang/String;)
+java/lang/System::lineSeparator()
+java/lang/System::load(Ljava/lang/String;)
+java/lang/System::loadLibrary(Ljava/lang/String;)
+java/lang/System::mapLibraryName(Ljava/lang/String;)
+java/lang/System::nanoTime()
http://cr.openjdk.java.net/~iignatyev//8239500/webrev.01 <http://cr.openjdk.java.net/~iignatyev//8239500/webrev.01> excludes them all, and also sorts exclude.methods.lst so it's (somewhat) easier to see which methods are (not) excluded. I've also modified the commit message and bug summary to be more generic.
Thanks,
-- Igor
> On Feb 25, 2020, at 11:10 AM, Leonid Mesnik <leonid.mesnik at oracle.com> wrote:
>
> The fix looks good.
>
> I think that we also need to exclude getenv* and getProperties(y) methods. Their results depend on host. So generated code like System.getenv().size() is not determined.
>
>
> Leonid
>
> On 2/25/20 10:29 AM, Igor Ignatyev wrote:
>> http://cr.openjdk.java.net/~iignatyev//8239500/webrev.00
>>> 2 lines changed: 2 ins; 0 del; 0 mod;
>> Hi all,
>>
>> could you please review this small and trivial patch which prohibits usage of System::nanoTime and currentTimeMills methods by jit-tester due to their indeterminism?
>>
>> JBS: https://bugs.openjdk.java.net/browse/JDK-8239500
>> webrev: http://cr.openjdk.java.net/~iignatyev//8239500/webrev.00
>>
>> Thanks,
>> -- Igor
>>
More information about the hotspot-compiler-dev
mailing list