Mercurial > hg > graal-jvmci-8
comparison mx/mx_graal.py @ 17052:35fda668ed6e
mx: added ctw command to simplify executing CompileTheWorld
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 04 Sep 2014 22:34:03 +0200 |
parents | ffddcdca8e74 |
children | 3e4d3be0b6bf |
comparison
equal
deleted
inserted
replaced
17051:c25fcf343b4f | 17052:35fda668ed6e |
---|---|
1329 self.duration = datetime.timedelta(seconds=self.end - self.start) | 1329 self.duration = datetime.timedelta(seconds=self.end - self.start) |
1330 mx.log(time.strftime('gate: %d %b %Y %H:%M:%S: ABORT: ') + self.title + ' [' + str(self.duration) + ']') | 1330 mx.log(time.strftime('gate: %d %b %Y %H:%M:%S: ABORT: ') + self.title + ' [' + str(self.duration) + ']') |
1331 mx.abort(codeOrMessage) | 1331 mx.abort(codeOrMessage) |
1332 return self | 1332 return self |
1333 | 1333 |
1334 def ctw(args): | |
1335 """run CompileTheWorld""" | |
1336 from sanitycheck import CTWMode | |
1337 modes = { | |
1338 'noinline' : CTWMode.NoInline, | |
1339 'nocomplex' : CTWMode.NoComplex, | |
1340 'full' : CTWMode.Full | |
1341 } | |
1342 mode = sanitycheck.CTWMode.NoInline | |
1343 vmargs = [] | |
1344 for a in args: | |
1345 m = modes.get(a, None) | |
1346 if m: | |
1347 mode = m | |
1348 else: | |
1349 vmargs.append(a) | |
1350 | |
1351 jdk = _jdk(installJars=False) | |
1352 rtjar = join(jdk, 'jre', 'lib', 'rt.jar') | |
1353 | |
1354 vm_ = _get_vm() | |
1355 | |
1356 args = vmargs + ['-XX:+CompileTheWorld', '-Xbootclasspath/p:' + rtjar] | |
1357 if vm_ == 'graal': | |
1358 args += ['-XX:+BootstrapGraal'] | |
1359 if mode >= CTWMode.NoInline: | |
1360 if not isGraalEnabled(vm_): | |
1361 args.append('-XX:-Inline') | |
1362 else: | |
1363 args.append('-G:-Inline') | |
1364 if mode >= CTWMode.NoComplex: | |
1365 if isGraalEnabled(vm_): | |
1366 args += ['-G:-OptLoopTransform', '-G:-OptTailDuplication', '-G:-FullUnroll', '-G:-MemoryAwareScheduling', '-G:-NewMemoryAwareScheduling', '-G:-PartialEscapeAnalysis'] | |
1367 vm(args) | |
1368 | |
1334 def _basic_gate_body(args, tasks): | 1369 def _basic_gate_body(args, tasks): |
1335 t = Task('BuildHotSpotGraal: fastdebug,product') | 1370 t = Task('BuildHotSpotGraal: fastdebug,product') |
1336 buildvms(['--vms', 'graal,server', '--builds', 'fastdebug,product']) | 1371 buildvms(['--vms', 'graal,server', '--builds', 'fastdebug,product']) |
1337 tasks.append(t.stop()) | 1372 tasks.append(t.stop()) |
1338 | 1373 |
2246 'buildvars': [buildvars, ''], | 2281 'buildvars': [buildvars, ''], |
2247 'buildvms': [buildvms, '[-options]'], | 2282 'buildvms': [buildvms, '[-options]'], |
2248 'c1visualizer' : [c1visualizer, ''], | 2283 'c1visualizer' : [c1visualizer, ''], |
2249 'checkheaders': [checkheaders, ''], | 2284 'checkheaders': [checkheaders, ''], |
2250 'clean': [clean, ''], | 2285 'clean': [clean, ''], |
2286 'ctw': [ctw, '[-vmoptions|noinline|nocomplex|full]'], | |
2251 'findbugs': [findbugs, ''], | 2287 'findbugs': [findbugs, ''], |
2252 'generateZshCompletion' : [generateZshCompletion, ''], | 2288 'generateZshCompletion' : [generateZshCompletion, ''], |
2253 'hsdis': [hsdis, '[att]'], | 2289 'hsdis': [hsdis, '[att]'], |
2254 'hcfdis': [hcfdis, ''], | 2290 'hcfdis': [hcfdis, ''], |
2255 'igv' : [igv, ''], | 2291 'igv' : [igv, ''], |