Mercurial > hg > truffle
comparison mx/mx_graal.py @ 16201:6140fd60abe9
Merge.
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 24 Jun 2014 23:29:13 +0200 |
parents | 97a10428ff2c 1f4955abca9b |
children | bf0e3ff4b2c4 |
comparison
equal
deleted
inserted
replaced
16200:38bb9b5b8544 | 16201:6140fd60abe9 |
---|---|
1865 vmArgs, slArgs = _extract_VM_args(args) | 1865 vmArgs, slArgs = _extract_VM_args(args) |
1866 vm(vmArgs + ['-cp', mx.classpath("com.oracle.truffle.sl"), "com.oracle.truffle.sl.SLMain"] + slArgs) | 1866 vm(vmArgs + ['-cp', mx.classpath("com.oracle.truffle.sl"), "com.oracle.truffle.sl.SLMain"] + slArgs) |
1867 | 1867 |
1868 def isGraalEnabled(vm): | 1868 def isGraalEnabled(vm): |
1869 return vm != 'original' and not vm.endswith('nograal') | 1869 return vm != 'original' and not vm.endswith('nograal') |
1870 | |
1871 def jol(args): | |
1872 """Java Object Layout""" | |
1873 jolurl = "http://lafo.ssw.uni-linz.ac.at/truffle/jol/jol-internals.jar" | |
1874 joljar = "lib/jol-internals.jar" | |
1875 if not exists(joljar): | |
1876 mx.download(joljar, [jolurl]) | |
1877 | |
1878 candidates = mx.findclass(args, logToConsole=False, matcher=lambda s, classname: s == classname or classname.endswith('.' + s) or classname.endswith('$' + s)) | |
1879 if len(candidates) > 10: | |
1880 print "Found %d candidates. Please be more precise." % (len(candidates)) | |
1881 return | |
1882 | |
1883 vm(['-javaagent:' + joljar, '-cp', os.pathsep.join([mx.classpath(), joljar]), "org.openjdk.jol.MainObjectInternals"] + candidates) | |
1870 | 1884 |
1871 def site(args): | 1885 def site(args): |
1872 """create a website containing javadoc and the project dependency graph""" | 1886 """create a website containing javadoc and the project dependency graph""" |
1873 | 1887 |
1874 return mx.site(['--name', 'Graal', | 1888 return mx.site(['--name', 'Graal', |
2092 'vm': [vm, '[-options] class [args...]'], | 2106 'vm': [vm, '[-options] class [args...]'], |
2093 'vmg': [vmg, '[-options] class [args...]'], | 2107 'vmg': [vmg, '[-options] class [args...]'], |
2094 'vmfg': [vmfg, '[-options] class [args...]'], | 2108 'vmfg': [vmfg, '[-options] class [args...]'], |
2095 'deoptalot' : [deoptalot, '[n]'], | 2109 'deoptalot' : [deoptalot, '[n]'], |
2096 'longtests' : [longtests, ''], | 2110 'longtests' : [longtests, ''], |
2097 'sl' : [sl, '[SL args|@VM options]'] | 2111 'sl' : [sl, '[SL args|@VM options]'], |
2112 'jol' : [jol, ''], | |
2098 } | 2113 } |
2099 | 2114 |
2100 mx.add_argument('--jacoco', help='instruments com.oracle.* classes using JaCoCo', default='off', choices=['off', 'on', 'append']) | 2115 mx.add_argument('--jacoco', help='instruments com.oracle.* classes using JaCoCo', default='off', choices=['off', 'on', 'append']) |
2101 mx.add_argument('--vmcwd', dest='vm_cwd', help='current directory will be changed to <path> before the VM is executed', default=None, metavar='<path>') | 2116 mx.add_argument('--vmcwd', dest='vm_cwd', help='current directory will be changed to <path> before the VM is executed', default=None, metavar='<path>') |
2102 mx.add_argument('--installed-jdks', help='the base directory in which the JDKs cloned from $JAVA_HOME exist. ' + | 2117 mx.add_argument('--installed-jdks', help='the base directory in which the JDKs cloned from $JAVA_HOME exist. ' + |