RFR(S) [12] : 8158646 : [jittester] generated tests may not compile by javac

Igor Ignatyev igor.ignatyev at oracle.com
Wed Jan 23 17:46:24 UTC 2019


Hi Vladimir,

thanks for your review!

>>  - make sure jaotc is always run w/ X-mixed regardless of "external" vm flags
> Also would be nice to add -ea -esa too if they are not used yet.
-Xmixed was added to "speed-up" compilation in case external flags has Xcomp. from my point of view, it's better if '-ea -esa' are provided during test runs, as in some cases you might want to run jaotc w/o them. 

>>  - add -Xcomp to all the generator tests
> why you need -Xcomp?
b/c jit-tester is supposed to compare results of interpreted execution (saved in .gold.* files) w/ the result from compilers, so generated tests must be run w/ Xcomp, otherwise we will comparing one results from interpreter w/ the results from interpreter.

>>  - use tmp directory for class files
> Will it work on Windows which has issues with tmp dir? There was discussion about it recently.
we use tmp dir only in the test generator which can be run on any platform, it doesn't have to be run on the same host/platform as actual test execution. in fact the preferred usage model of jit-tester is to pre-generate test corpus and reuse it.

Thanks,
-- Igor

> On Jan 23, 2019, at 9:24 AM, Vladimir Kozlov <vladimir.kozlov at oracle.com> wrote:
> 
> On 1/22/19 6:26 PM, Igor Ignatyev wrote:
>> http://cr.openjdk.java.net/~iignatyev//8158646/webrev.00/index.html
>>> 64 lines changed: 23 ins; 6 del; 35 mod;
>> Hi all,
>> could you please review this small fix for jit-tester?
>> the bug was caused by TypeList not being fully cleared b/w generation. we only remove classes which starts w/ "Test_", so we don't remove "basic" classes, e.g. Runnable, and don't clean their 'children'. in most cases, this is fine, as each generation will use only its own Test_N_* classes so having Test_M_* (M != N) classes as Runnable's children has no impact besides garbage in memory, however, if we get an error during Test_N generation we will redo generation for the same N, and in such cases, previous children of "basic" classes (read Runnable) cause incompatible types. the fix is to remove "Test_" classes from the children.
> 
> ok
> 
>> besides the fix for the bug, the patch also include the following small clean ups:
>>  - use DIST_JAR var value instead of 'JAR' string constant in makefile
> 
> ok
> 
>>  - change default target testbase dir
> 
> ok
> 
>>  - make sure jaotc is always run w/ X-mixed regardless of "external" vm flags
> 
> Also would be nice to add -ea -esa too if they are not used yet.
> 
>>  - add -Xcomp to all the generator tests
> 
> why you need -Xcomp?
> 
>>  - use tmp directory for class files
> 
> Will it work on Windows which has issues with tmp dir? There was discussion about it recently.
> 
>>  - check javac error code
> 
> ok
> 
>>  - optimize getAllParents/getAllChildren to call getAllParents/getAllChildren only if a class hasn't been added yet
> 
> ok
> 
> Thanks,
> Vladimir
> 
>> webrev: http://cr.openjdk.java.net/~iignatyev//8158646/webrev.00/index.html
>> JBS: https://bugs.openjdk.java.net/browse/JDK-8158646
>> testing: generated 1000 tests, all can be compiled and work fine
>> Thanks,
>> -- Igor



More information about the hotspot-compiler-dev mailing list