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

Igor Ignatyev igor.ignatyev at oracle.com
Wed Jan 23 02:26:02 UTC 2019

> 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.

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
 - change default target testbase dir
 - make sure jaotc is always run w/ X-mixed regardless of "external" vm flags
 - add -Xcomp to all the generator tests
 - use tmp directory for class files
 - check javac error code
 - optimize getAllParents/getAllChildren to call getAllParents/getAllChildren only if a class hasn't been added yet 

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

-- Igor  

More information about the hotspot-compiler-dev mailing list