# HG changeset patch # User Gilles Duboscq # Date 1369307648 -7200 # Node ID 8e33b4ebfef1e16ba6c3590955239ffa882f2b6c # Parent 9dcd6f8a843b9db37e3c811a39f51bfc7e6acf12 add isGraalEnabled(vm) function in commands.py diff -r 9dcd6f8a843b -r 8e33b4ebfef1 mx/commands.py --- a/mx/commands.py Thu May 23 12:07:34 2013 +0200 +++ b/mx/commands.py Thu May 23 13:14:08 2013 +0200 @@ -825,7 +825,7 @@ def harness(projectscp, vmArgs): if not exists(javaClass) or getmtime(javaClass) < getmtime(javaSource): subprocess.check_call([mx.java().javac, '-cp', projectscp, '-d', mxdir, javaSource]) - if _vm == 'original' or _vm.endswith('nograal'): + if not isGraalEnabled(_vm): prefixArgs = ['-esa', '-ea'] else: prefixArgs = ['-XX:-BootstrapGraal', '-esa', '-ea'] @@ -1333,6 +1333,9 @@ mx.abort('jacocoreport takes only one argument : an output directory') mx.run_java(['-jar', jacocoreport.get_path(True), '-in', 'jacoco.exec', '-g', join(_graal_home, 'graal'), out]) +def isGraalEnabled(vm): + return vm != 'original' and not vm.endswith('nograal') + def site(args): """create a website containing javadoc and the project dependency graph""" diff -r 9dcd6f8a843b -r 8e33b4ebfef1 mx/sanitycheck.py --- a/mx/sanitycheck.py Thu May 23 12:07:34 2013 +0200 +++ b/mx/sanitycheck.py Thu May 23 13:14:08 2013 +0200 @@ -235,15 +235,15 @@ args = ['-XX:+CompileTheWorld', '-Xbootclasspath/p:' + rtjar] - if not vm.endswith('-nograal'): + if commands.isGraalEnabled(vm): args += ['-XX:+BootstrapGraal', '-G:-Debug'] if mode >= CTWMode.NoInline: - if vm.endswith('-nograal'): + if not commands.isGraalEnabled(vm): args.append('-XX:-Inline') else: args.append('-G:-Inline') if mode >= CTWMode.NoComplex: - if not vm.endswith('-nograal'): + if commands.isGraalEnabled(vm): args += ['-G:-OptLoopTransform', '-G:-OptTailDuplication', '-G:-FullUnroll', '-G:-MemoryAwareScheduling', '-G:-PartialEscapeAnalysis'] return Test("CompileTheWorld", args, successREs=[time], scoreMatchers=[scoreMatcher], benchmarkCompilationRate=False)