@@ -20,18 +20,16 @@ const matrix = new MatrixBuilder();
2020matrix . addAxis ( {
2121 name : 'java_distribution' ,
2222 values : [
23- 'corretto' ,
24- 'liberica' ,
25- 'microsoft' ,
26- 'oracle' ,
27- 'temurin' ,
28- 'zulu' ,
23+ { value : 'corretto' , weight : 1 } ,
24+ { value : 'liberica' , weight : 1 } ,
25+ { value : 'microsoft' , weight : 1 } ,
26+ { value : 'oracle' , weight : 1 } ,
27+ { value : 'semeru' , weight : 4 } ,
28+ { value : 'temurin' , weight : 1 } ,
29+ { value : 'zulu' , weight : 1 } ,
2930 ]
3031} ) ;
3132
32- // TODO: support different JITs (see https://github.com/actions/setup-java/issues/279)
33- matrix . addAxis ( { name : 'jit' , title : '' , values : [ 'hotspot' ] } ) ;
34-
3533// See the supported versions at https://foojay.io/almanac/java-17/
3634matrix . addAxis ( {
3735 name : 'java_version' ,
@@ -92,12 +90,16 @@ matrix.setNamePattern([
9290 'tz' , 'locale' ,
9391] ) ;
9492
93+ // Semeru uses OpenJ9 jit which has no option for making hash codes the same
94+ // See https://github.com/eclipse-openj9/openj9/issues/17309
95+ matrix . exclude ( { java_distribution : { value : 'semeru' } , hash : { value : 'same' } } ) ;
96+ matrix . exclude ( { java_distribution : { value : 'semeru' } , java_version : '19' } ) ;
9597// Microsoft Java has no distribution for 8, 18, 19
96- matrix . exclude ( { java_distribution : 'microsoft' , java_version : '8' } ) ;
97- matrix . exclude ( { java_distribution : 'microsoft' , java_version : '18' } ) ;
98- matrix . exclude ( { java_distribution : 'microsoft' , java_version : '19' } ) ;
98+ matrix . exclude ( { java_distribution : { value : 'microsoft' } , java_version : '8' } ) ;
99+ matrix . exclude ( { java_distribution : { value : 'microsoft' } , java_version : '18' } ) ;
100+ matrix . exclude ( { java_distribution : { value : 'microsoft' } , java_version : '19' } ) ;
99101// Oracle supports 17+ only
100- matrix . exclude ( { java_distribution : 'oracle' , java_version : [ '8' , '11' , '19' ] } ) ;
102+ matrix . exclude ( { java_distribution : { value : 'oracle' } , java_version : [ '8' , '11' , '19' ] } ) ;
101103// TODO: remove when compileJava with "same hashcode" issues are resolved
102104// See https://bugs.openjdk.org/browse/JDK-8288590 is resolved
103105// See https://github.com/jqwik-team/jqwik/pull/460#issuecomment-1428261036
@@ -133,14 +135,19 @@ include.forEach(v => {
133135} ) ;
134136include . forEach ( v => {
135137 let jvmArgs = [ ] ;
136-
138+ // Extra JVM arguments passed to test execution
139+ let testJvmArgs = [ ] ;
137140 if ( v . hash . value === 'same' ) {
138- jvmArgs . push ( '-XX:+UnlockExperimentalVMOptions' , '-XX:hashCode=2' ) ;
141+ // javac has issues with "same hashcode" option (see https://bugs.openjdk.org/browse/JDK-8288590)
142+ // On the other hand, kotlinc uses "object identity" a lot. It works properly,
143+ // but it becomes slow as HashMap degrades. So we pass "same hashcode" to test executions only.
144+ testJvmArgs . push ( '-XX:+UnlockExperimentalVMOptions' , '-XX:hashCode=2' ) ;
139145 }
140146 // Pass locale via _JAVA_OPTIONS so all the forked processes inherit it
141147 jvmArgs . push ( `-Duser.country=${ v . locale . country } ` ) ;
142148 jvmArgs . push ( `-Duser.language=${ v . locale . language } ` ) ;
143- if ( v . jit === 'hotspot' && Math . random ( ) > 0.5 ) {
149+ v . java_distribution = v . java_distribution . value ;
150+ if ( v . java_distribution !== 'semeru' && Math . random ( ) > 0.5 ) {
144151 // The following options randomize instruction selection in JIT compiler
145152 // so it might reveal missing synchronization in TestNG code
146153 v . name += ', stress JIT' ;
@@ -164,7 +171,8 @@ include.forEach(v => {
164171 jvmArgs . push ( '-XX:+StressCCP' ) ;
165172 }
166173 }
167- v . testExtraJvmArgs = jvmArgs . join ( ' ' ) ;
174+ v . extraJvmArgs = jvmArgs . join ( ' ' ) ;
175+ v . testExtraJvmArgs = testJvmArgs . join ( ' ::: ' ) ;
168176 delete v . hash ;
169177} ) ;
170178
0 commit comments