Mercurial > hg > graal-compiler
changeset 22319:42f424266138
moved ctw command to mx_graal.py and re-added graal.debug project declarations
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 24 Jul 2015 11:09:11 +0200 |
parents | 3ea10576bea7 |
children | b1ed20090527 |
files | mx.graal/mx_graal.py mx.graal/suite.py |
diffstat | 2 files changed, 63 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mx.graal/mx_graal.py Fri Jul 24 08:33:42 2015 +0200 +++ b/mx.graal/mx_graal.py Fri Jul 24 11:09:11 2015 +0200 @@ -26,13 +26,14 @@ import os, platform from os.path import join, exists +from argparse import ArgumentParser import sanitycheck import itertools import json import mx import mx_jvmci -from mx_jvmci import JvmciJDKDeployedDist, vm, VM, Task, parseVmArgs, get_vm, ctw, isVMSupported +from mx_jvmci import JvmciJDKDeployedDist, vm, VM, Task, parseVmArgs, get_vm, isVMSupported, isJVMCIEnabled, get_jvmci_jdk import mx_unittest from mx_unittest import unittest import mx_gate @@ -171,6 +172,40 @@ args += ['--jvmArgsPrepend', ' '.join(['-' + jvm] + vmArgs)] vm(args + jmhArgs) +def ctw(args): + """run CompileTheWorld""" + + defaultCtwopts = '-Inline' + + parser = ArgumentParser(prog='mx ctw') + parser.add_argument('--ctwopts', action='store', help='space separated JVMCI options used for CTW compilations (default: --ctwopts="' + defaultCtwopts + '")', default=defaultCtwopts, metavar='<options>') + parser.add_argument('--jar', action='store', help='jar of classes to compiled instead of rt.jar', metavar='<path>') + + args, vmargs = parser.parse_known_args(args) + + if args.ctwopts: + vmargs.append('-G:CompileTheWorldConfig=' + args.ctwopts) + + if args.jar: + jar = os.path.abspath(args.jar) + else: + jar = join(get_jvmci_jdk(installJars=False), 'jre', 'lib', 'rt.jar') + vmargs.append('-G:CompileTheWorldExcludeMethodFilter=sun.awt.X11.*.*') + + vmargs += ['-XX:+CompileTheWorld'] + vm_ = get_vm() + if isJVMCIEnabled(vm_): + if vm_ == 'jvmci': + vmargs += ['-XX:+BootstrapJVMCI'] + vmargs += ['-G:CompileTheWorldClasspath=' + jar] + else: + vmargs += ['-Xbootclasspath/p:' + jar] + + # suppress menubar and dock when running on Mac; exclude x11 classes as they may cause vm crashes (on Solaris) + vmargs = ['-Djava.awt.headless=true'] + vmargs + + vm(vmargs) + def _graal_gate_runner(args, tasks): # Run unit tests on server-hosted-jvmci with -G:-SSA_LIR @@ -390,6 +425,7 @@ _run_benchmark(args, None, launcher) mx.update_commands(_suite, { + 'ctw': [ctw, '[-vmoptions|noinline|nocomplex|full]'], 'dacapo': [dacapo, '[VM options] benchmarks...|"all" [DaCapo options]'], 'scaladacapo': [scaladacapo, '[VM options] benchmarks...|"all" [Scala DaCapo options]'], 'specjvm2008': [specjvm2008, '[VM options] benchmarks...|"all" [SPECjvm2008 options]'],
--- a/mx.graal/suite.py Fri Jul 24 08:33:42 2015 +0200 +++ b/mx.graal/suite.py Fri Jul 24 11:09:11 2015 +0200 @@ -6,7 +6,7 @@ "suites": [ { "name" : "jvmci", - "version" : "9e49e61995d6408db1d2f2399f6c4a96e26b7c90", + "version" : "486822772780ac210c484d4ae2d457d1ef6c01fd", "urls" : [ {"url" : "https://lafo.ssw.uni-linz.ac.at/hg/graal-jvmci-8", "kind" : "hg"}, {"url" : "http://lafo.ssw.uni-linz.ac.at/nexus/content/repositories/snapshots", "kind" : "binary"}, @@ -91,6 +91,30 @@ # ------------- Graal ------------- + "com.oracle.graal.debug" : { + "subDir" : "graal", + "sourceDirs" : ["src"], + "checkstyle" : "com.oracle.graal.graph", + "dependencies" : [ + "jvmci:JVMCI_API", + ], + "annotationProcessors" : ["jvmci:JVMCI_OPTIONS_PROCESSOR"], + "javaCompliance" : "1.8", + "workingSets" : "JVMCI,Debug", + }, + + "com.oracle.graal.debug.test" : { + "subDir" : "graal", + "sourceDirs" : ["src"], + "dependencies" : [ + "mx:JUNIT", + "com.oracle.graal.debug", + ], + "checkstyle" : "com.oracle.graal.graph", + "javaCompliance" : "1.8", + "workingSets" : "JVMCI,Debug,Test", + }, + "com.oracle.graal.code" : { "subDir" : "graal", "sourceDirs" : ["src"], @@ -268,7 +292,6 @@ "com.oracle.graal.debug", "com.oracle.graal.nodeinfo", "com.oracle.graal.compiler.common", - "com.oracle.graal.debug", "com.oracle.graal.api.collections", "com.oracle.graal.api.runtime", ], @@ -340,7 +363,7 @@ "dependencies" : [ "com.oracle.graal.code", "com.oracle.graal.test", - "jvmci:JVMCI_API", + "com.oracle.graal.debug", ], "checkstyle" : "com.oracle.graal.graph", "javaCompliance" : "1.8",