Mercurial > hg > graal-jvmci-8
diff mx/mx_graal.py @ 17372:d42e11af980d
mx: simplified ctw command
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 09 Oct 2014 00:20:30 +0200 |
parents | 4f9633b83a24 |
children | 9e5abd0e7916 |
line wrap: on
line diff
--- a/mx/mx_graal.py Thu Oct 09 00:20:19 2014 +0200 +++ b/mx/mx_graal.py Thu Oct 09 00:20:30 2014 +0200 @@ -1358,38 +1358,26 @@ def ctw(args): """run CompileTheWorld""" - from sanitycheck import CTWMode - modes = { - 'noinline' : CTWMode.NoInline, - 'nocomplex' : CTWMode.NoComplex, - 'full' : CTWMode.Full - } - mode = sanitycheck.CTWMode.NoInline - vmargs = [] - for a in args: - m = modes.get(a, None) - if m: - mode = m - else: - vmargs.append(a) + + parser = ArgumentParser(prog='mx ctw') + parser.add_argument('--ctwopts', action='store', help='space separated Graal options (without the -G: prefix) used for CTW compilations') + parser.add_argument('--jar', action='store', help='jar of classes to compiled instead of rt.jar') + parser.add_argument('vmargs', nargs=REMAINDER, metavar='VM options...') + + args, vmargs = parser.parse_known_args(args) - jdk = _jdk(installJars=False) - rtjar = join(jdk, 'jre', 'lib', 'rt.jar') - - vm_ = _get_vm() + if args.ctwopts: + vmargs.append('-G:CompileTheWorldConfig=' + args.ctwopts) - args = vmargs + ['-XX:+CompileTheWorld', '-Xbootclasspath/p:' + rtjar] - if vm_ == 'graal': - args += ['-XX:+BootstrapGraal'] - if mode >= CTWMode.NoInline: - if not isGraalEnabled(vm_): - args.append('-XX:-Inline') - else: - args.append('-G:-Inline') - if mode >= CTWMode.NoComplex: - if isGraalEnabled(vm_): - args += ['-G:-OptLoopTransform', '-G:-OptTailDuplication', '-G:-FullUnroll', '-G:-MemoryAwareScheduling', '-G:-NewMemoryAwareScheduling', '-G:-PartialEscapeAnalysis'] - vm(args) + if args.jar: + jar = args.jar + else: + jar = join(_jdk(installJars=False), 'jre', 'lib', 'rt.jar') + + vmargs += ['-XX:+CompileTheWorld', '-Xbootclasspath/p:' + jar] + if _get_vm() == 'graal': + vmargs += ['-XX:+BootstrapGraal'] + vm(vmargs) def _basic_gate_body(args, tasks): t = Task('BuildHotSpotGraal: fastdebug,product') @@ -1748,8 +1736,6 @@ benchmarks.append(sanitycheck.getCTW(vm, sanitycheck.CTWMode.Full)) if 'ctw-noinline' in args: benchmarks.append(sanitycheck.getCTW(vm, sanitycheck.CTWMode.NoInline)) - if 'ctw-nocomplex' in args: - benchmarks.append(sanitycheck.getCTW(vm, sanitycheck.CTWMode.NoComplex)) for test in benchmarks: for (groupName, res) in test.bench(vm, extraVmOpts=vmArgs).items():