Mercurial > hg > graal-compiler
comparison mx.graal/mx_graal.py @ 22291:d2ec93b0a88e
moved gate from mx_jvmci.py to mx_gate.py in core mx
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 23 Jul 2015 13:06:53 +0200 |
parents | 3bf1bdd3c0c3 |
children | 782394d3d465 |
comparison
equal
deleted
inserted
replaced
22290:109a255a3a47 | 22291:d2ec93b0a88e |
---|---|
30 import itertools | 30 import itertools |
31 import json | 31 import json |
32 | 32 |
33 import mx | 33 import mx |
34 import mx_jvmci | 34 import mx_jvmci |
35 from mx_jvmci import JvmciJDKDeployedDist, buildvms, vm, VM, Task, parseVmArgs, get_vm, ctw, isVMSupported | 35 from mx_jvmci import JvmciJDKDeployedDist, vm, VM, Task, parseVmArgs, get_vm, ctw, isVMSupported |
36 import mx_unittest | 36 import mx_unittest |
37 from mx_unittest import unittest | 37 from mx_unittest import unittest |
38 import mx_gate | |
38 | 39 |
39 _suite = mx.suite('graal') | 40 _suite = mx.suite('graal') |
40 | 41 |
41 class GraalJDKDeployedDist(JvmciJDKDeployedDist): | 42 class GraalJDKDeployedDist(JvmciJDKDeployedDist): |
42 def __init__(self): | 43 def __init__(self): |
70 mx_jvmci.jdkDeployedDists += [ | 71 mx_jvmci.jdkDeployedDists += [ |
71 GraalJDKDeployedDist(), | 72 GraalJDKDeployedDist(), |
72 JvmciJDKDeployedDist('GRAAL_TRUFFLE'), | 73 JvmciJDKDeployedDist('GRAAL_TRUFFLE'), |
73 ] | 74 ] |
74 | 75 |
75 mx_jvmci.jacocoIncludes += ['com.oracle.graal.*'] | 76 mx_gate.add_jacoco_includes(['com.oracle.graal.*']) |
76 mx_jvmci.jacocoExcludedAnnotations += ['@Snippet', '@ClassSubstitution'] | 77 mx_gate.add_jacoco_excluded_annotations(['@Snippet', '@ClassSubstitution']) |
77 | 78 |
78 def _unittest_config_participant(config): | 79 def _unittest_config_participant(config): |
79 vmArgs, mainClass, mainClassArgs = config | 80 vmArgs, mainClass, mainClassArgs = config |
80 # Unconditionally prepend truffle.jar to the boot class path. | 81 # Unconditionally prepend truffle.jar to the boot class path. |
81 # This used to be done by the VM itself but was removed to | 82 # This used to be done by the VM itself but was removed to |
169 (_, _, jvm, _, _) = parseVmArgs(vmArgs) | 170 (_, _, jvm, _, _) = parseVmArgs(vmArgs) |
170 args += ['--jvmArgsPrepend', ' '.join(['-' + jvm] + vmArgs)] | 171 args += ['--jvmArgsPrepend', ' '.join(['-' + jvm] + vmArgs)] |
171 vm(args + jmhArgs) | 172 vm(args + jmhArgs) |
172 | 173 |
173 def _graal_gate_runner(args, tasks): | 174 def _graal_gate_runner(args, tasks): |
174 # Build server-hosted-jvmci now so we can run the unit tests | |
175 with Task('BuildHotSpotJVMCIHosted: product', tasks) as t: | |
176 if t: buildvms(['--vms', 'server', '--builds', 'product', '--check-distributions']) | |
177 | |
178 # Run unit tests on server-hosted-jvmci | |
179 with VM('server', 'product'): | |
180 with Task('UnitTests:hosted-product', tasks) as t: | |
181 if t: unittest(['--enable-timing', '--verbose', '--fail-fast']) | |
182 | 175 |
183 # Run unit tests on server-hosted-jvmci with -G:-SSA_LIR | 176 # Run unit tests on server-hosted-jvmci with -G:-SSA_LIR |
184 with VM('server', 'product'): | 177 with VM('server', 'product'): |
185 with Task('UnitTestsNonSSA:hosted-product', tasks) as t: | 178 with Task('UnitTestsNonSSA:hosted-product', tasks) as t: |
186 if t: unittest(['--enable-timing', '--verbose', '--fail-fast', '-G:-SSA_LIR']) | 179 if t: unittest(['--enable-timing', '--verbose', '--fail-fast', '-G:-SSA_LIR']) |
188 with VM('server', 'product'): | 181 with VM('server', 'product'): |
189 with Task('CTW:hosted-product', tasks) as t: | 182 with Task('CTW:hosted-product', tasks) as t: |
190 if t: ctw(['--ctwopts', '-Inline +ExitVMOnException', '-esa', '-G:+CompileTheWorldMultiThreaded', '-G:-InlineDuringParsing', '-G:-CompileTheWorldVerbose']) | 183 if t: ctw(['--ctwopts', '-Inline +ExitVMOnException', '-esa', '-G:+CompileTheWorldMultiThreaded', '-G:-InlineDuringParsing', '-G:-CompileTheWorldVerbose']) |
191 | 184 |
192 # Build the other VM flavors | 185 # Build the other VM flavors |
193 with Task('BuildHotSpotGraalOthers: fastdebug,product', tasks) as t: | |
194 if t: buildvms(['--vms', 'jvmci,server', '--builds', 'fastdebug,product', '--check-distributions']) | |
195 | |
196 with VM('jvmci', 'fastdebug'): | |
197 with Task('BootstrapWithSystemAssertions:fastdebug', tasks) as t: | |
198 if t: vm(['-esa', '-XX:-TieredCompilation', '-version']) | |
199 | |
200 with VM('jvmci', 'fastdebug'): | 186 with VM('jvmci', 'fastdebug'): |
201 with Task('BootstrapEconomyWithSystemAssertions:fastdebug', tasks) as t: | 187 with Task('BootstrapEconomyWithSystemAssertions:fastdebug', tasks) as t: |
202 if t: vm(['-esa', '-XX:-TieredCompilation', '-G:CompilerConfiguration=economy', '-version']) | 188 if t: vm(['-esa', '-XX:-TieredCompilation', '-G:CompilerConfiguration=economy', '-version']) |
203 | 189 |
204 with VM('jvmci', 'fastdebug'): | 190 with VM('jvmci', 'fastdebug'): |
205 with Task('BootstrapWithSystemAssertionsNoCoop:fastdebug', tasks) as t: | |
206 if t: vm(['-esa', '-XX:-TieredCompilation', '-XX:-UseCompressedOops', '-version']) | |
207 | |
208 with VM('jvmci', 'fastdebug'): | |
209 with Task('BootstrapWithExceptionEdges:fastdebug', tasks) as t: | 191 with Task('BootstrapWithExceptionEdges:fastdebug', tasks) as t: |
210 if t: vm(['-esa', '-XX:-TieredCompilation', '-G:+StressInvokeWithExceptionNode', '-version']) | 192 if t: vm(['-esa', '-XX:-TieredCompilation', '-G:+StressInvokeWithExceptionNode', '-version']) |
211 | |
212 with VM('jvmci', 'product'): | |
213 with Task('BootstrapWithGCVerification:product', tasks) as t: | |
214 if t: | |
215 out = mx.DuplicateSuppressingStream(['VerifyAfterGC:', 'VerifyBeforeGC:']).write | |
216 vm(['-XX:-TieredCompilation', '-XX:+UnlockDiagnosticVMOptions', '-XX:+VerifyBeforeGC', '-XX:+VerifyAfterGC', '-version'], out=out) | |
217 | |
218 with VM('jvmci', 'product'): | |
219 with Task('BootstrapWithG1GCVerification:product', tasks) as t: | |
220 if t: | |
221 out = mx.DuplicateSuppressingStream(['VerifyAfterGC:', 'VerifyBeforeGC:']).write | |
222 vm(['-XX:-TieredCompilation', '-XX:+UnlockDiagnosticVMOptions', '-XX:-UseSerialGC', '-XX:+UseG1GC', '-XX:+VerifyBeforeGC', '-XX:+VerifyAfterGC', '-version'], out=out) | |
223 | 193 |
224 with VM('jvmci', 'product'): | 194 with VM('jvmci', 'product'): |
225 with Task('BootstrapWithRegisterPressure:product', tasks) as t: | 195 with Task('BootstrapWithRegisterPressure:product', tasks) as t: |
226 if t: | 196 if t: |
227 registers = 'o0,o1,o2,o3,f8,f9,d32,d34' if platform.processor() == 'sparc' else 'rbx,r11,r10,r14,xmm3,xmm11,xmm14' | 197 registers = 'o0,o1,o2,o3,f8,f9,d32,d34' if platform.processor() == 'sparc' else 'rbx,r11,r10,r14,xmm3,xmm11,xmm14' |
245 | 215 |
246 # ensure -Xbatch still works | 216 # ensure -Xbatch still works |
247 with VM('jvmci', 'product'): | 217 with VM('jvmci', 'product'): |
248 with Task('DaCapo_pmd:BatchMode:product', tasks) as t: | 218 with Task('DaCapo_pmd:BatchMode:product', tasks) as t: |
249 if t: dacapo(['-Xbatch', 'pmd']) | 219 if t: dacapo(['-Xbatch', 'pmd']) |
250 | |
251 # ensure -Xcomp still works | |
252 with VM('jvmci', 'product'): | |
253 with Task('XCompMode:product', tasks) as t: | |
254 if t: vm(['-Xcomp', '-version']) | |
255 | 220 |
256 # Prevent JVMCI modifications from breaking the standard builds | 221 # Prevent JVMCI modifications from breaking the standard builds |
257 if args.buildNonJVMCI: | 222 if args.buildNonJVMCI: |
258 for vmbuild in ['product', 'fastdebug']: | 223 for vmbuild in ['product', 'fastdebug']: |
259 for theVm in ['client', 'server']: | 224 for theVm in ['client', 'server']: |
265 if t: dacapo(['pmd']) | 230 if t: dacapo(['pmd']) |
266 | 231 |
267 with Task('UnitTests:' + theVm + ':' + vmbuild, tasks) as t: | 232 with Task('UnitTests:' + theVm + ':' + vmbuild, tasks) as t: |
268 if t: unittest(['-XX:CompileCommand=exclude,*::run*', 'graal.api', 'java.test']) | 233 if t: unittest(['-XX:CompileCommand=exclude,*::run*', 'graal.api', 'java.test']) |
269 | 234 |
270 mx_jvmci.gateRunners.append(_graal_gate_runner) | 235 mx_gate.add_gate_runner(_graal_gate_runner) |
271 | 236 |
272 def deoptalot(args): | 237 def deoptalot(args): |
273 """bootstrap a VM with DeoptimizeALot and VerifyOops on | 238 """bootstrap a VM with DeoptimizeALot and VerifyOops on |
274 | 239 |
275 If the first argument is a number, the process will be repeated | 240 If the first argument is a number, the process will be repeated |