annotate mx.graal/mx_graal.py @ 22853:c1e6ec246708

Update Truffle version.
author Christian Humer <christian.humer@oracle.com>
date Tue, 20 Oct 2015 18:32:23 +0200
parents 8b6879d1ba16
children 28d8c9f880d5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3718
42e655a6a6f3 Added mx configuration.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
1 #
42e655a6a6f3 Added mx configuration.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
2 # ----------------------------------------------------------------------------------------------------
42e655a6a6f3 Added mx configuration.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
3 #
18897
9afee75cee46 mx: add microbench command to run JMH benchmarks
Roland Schatz <roland.schatz@oracle.com>
parents: 18894
diff changeset
4 # Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
3718
42e655a6a6f3 Added mx configuration.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
5 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
42e655a6a6f3 Added mx configuration.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
6 #
42e655a6a6f3 Added mx configuration.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
7 # This code is free software; you can redistribute it and/or modify it
42e655a6a6f3 Added mx configuration.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
8 # under the terms of the GNU General Public License version 2 only, as
42e655a6a6f3 Added mx configuration.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
9 # published by the Free Software Foundation.
42e655a6a6f3 Added mx configuration.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
10 #
42e655a6a6f3 Added mx configuration.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
11 # This code is distributed in the hope that it will be useful, but WITHOUT
42e655a6a6f3 Added mx configuration.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
42e655a6a6f3 Added mx configuration.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
42e655a6a6f3 Added mx configuration.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
14 # version 2 for more details (a copy is included in the LICENSE file that
42e655a6a6f3 Added mx configuration.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
15 # accompanied this code).
42e655a6a6f3 Added mx configuration.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
16 #
42e655a6a6f3 Added mx configuration.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
17 # You should have received a copy of the GNU General Public License version
42e655a6a6f3 Added mx configuration.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
18 # 2 along with this work; if not, write to the Free Software Foundation,
42e655a6a6f3 Added mx configuration.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
42e655a6a6f3 Added mx configuration.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
20 #
42e655a6a6f3 Added mx configuration.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
42e655a6a6f3 Added mx configuration.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
22 # or visit www.oracle.com if you need additional information or have any
42e655a6a6f3 Added mx configuration.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
23 # questions.
42e655a6a6f3 Added mx configuration.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
24 #
42e655a6a6f3 Added mx configuration.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
25 # ----------------------------------------------------------------------------------------------------
42e655a6a6f3 Added mx configuration.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
26
22770
42b173295a32 Use mx.get_arch instead of platform.processor
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 22764
diff changeset
27 import os
22665
f3fd15b9c703 added jdkartifactstats command
Doug Simon <doug.simon@oracle.com>
parents: 22656
diff changeset
28 from os.path import join, exists, basename
22319
42f424266138 moved ctw command to mx_graal.py and re-added graal.debug project declarations
Doug Simon <doug.simon@oracle.com>
parents: 22318
diff changeset
29 from argparse import ArgumentParser
4215
a2caa019ba3a Fix mx : commands' scripts mx_init hook should be called before parsing command line arguments.
Gilles Duboscq <gilles.m.duboscq@gmail.com>
parents: 4187
diff changeset
30 import sanitycheck
11367
39b86b83ddeb normalized the command line interface for the dacapo, scaladacapo, specjvm2008, specjbb2005 and specjbb2013 commands
Doug Simon <doug.simon@oracle.com>
parents: 11359
diff changeset
31 import itertools
22139
258eaaa98484 Initial split off from monolithic basic-graal repo
Doug Simon <doug.simon@oracle.com>
parents: 22108
diff changeset
32 import json
22405
0d437f833141 moved JVMCI option parsing back into Java
Doug Simon <doug.simon@oracle.com>
parents: 22390
diff changeset
33 import re
22031
434fbaaf53d7 moved findbugs support from mx_graal.py to mx_findbugs.py
Doug Simon <doug.simon@oracle.com>
parents: 22024
diff changeset
34
434fbaaf53d7 moved findbugs support from mx_graal.py to mx_findbugs.py
Doug Simon <doug.simon@oracle.com>
parents: 22024
diff changeset
35 import mx
22800
bfb7523ffc03 fixed jdkartifactstats for JDK9 and made get_vm() compatability for both mx_jvmci:8 and mx_jvmci:9
Doug Simon <doug.simon@oracle.com>
parents: 22799
diff changeset
36 from mx_jvmci import JvmciJDKDeployedDist, jdkDeployedDists, add_bootclasspath_prepend, buildvms, get_jvmci_jdk, run_vm, VM, relativeVmLibDirInJdk, isJVMCIEnabled
bfb7523ffc03 fixed jdkartifactstats for JDK9 and made get_vm() compatability for both mx_jvmci:8 and mx_jvmci:9
Doug Simon <doug.simon@oracle.com>
parents: 22799
diff changeset
37 from mx_jvmci import get_vm as _jvmci_get_vm
22786
fc5e7703e588 updated for mx_jvmci:9 changes
Doug Simon <doug.simon@oracle.com>
parents: 22770
diff changeset
38 from mx_gate import Task
22792
087d6b3e4c9b mx gate: add support for --extra-vm-argument.
Josef Eisl <josef.eisl@jku.at>
parents: 22786
diff changeset
39 from sanitycheck import _noneAsEmptyList
22753
f74225bf6671 changes for compatibility with jvmci-9
Doug Simon <doug.simon@oracle.com>
parents: 22667
diff changeset
40
22184
b5ac72b4f62a use unittest extensibility
Doug Simon <doug.simon@oracle.com>
parents: 22172
diff changeset
41 from mx_unittest import unittest
22291
d2ec93b0a88e moved gate from mx_jvmci.py to mx_gate.py in core mx
Doug Simon <doug.simon@oracle.com>
parents: 22285
diff changeset
42 import mx_gate
3718
42e655a6a6f3 Added mx configuration.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
43
22018
11ed27b2abe8 remove hard-coded use of 'mx' to refer to the mxDir for the graal suite
Doug Simon <doug.simon@oracle.com>
parents: 22017
diff changeset
44 _suite = mx.suite('graal')
4417
648a7873cea2 Made it possible to build and run the client and server VM with a new '--vm' option to 'mx build' and a global option of the same name.
Doug Simon <doug.simon@oracle.com>
parents: 4407
diff changeset
45
22800
bfb7523ffc03 fixed jdkartifactstats for JDK9 and made get_vm() compatability for both mx_jvmci:8 and mx_jvmci:9
Doug Simon <doug.simon@oracle.com>
parents: 22799
diff changeset
46 def get_vm():
bfb7523ffc03 fixed jdkartifactstats for JDK9 and made get_vm() compatability for both mx_jvmci:8 and mx_jvmci:9
Doug Simon <doug.simon@oracle.com>
parents: 22799
diff changeset
47 """
bfb7523ffc03 fixed jdkartifactstats for JDK9 and made get_vm() compatability for both mx_jvmci:8 and mx_jvmci:9
Doug Simon <doug.simon@oracle.com>
parents: 22799
diff changeset
48 Gets the name of the currently selected JVM variant.
bfb7523ffc03 fixed jdkartifactstats for JDK9 and made get_vm() compatability for both mx_jvmci:8 and mx_jvmci:9
Doug Simon <doug.simon@oracle.com>
parents: 22799
diff changeset
49 """
bfb7523ffc03 fixed jdkartifactstats for JDK9 and made get_vm() compatability for both mx_jvmci:8 and mx_jvmci:9
Doug Simon <doug.simon@oracle.com>
parents: 22799
diff changeset
50 vm = _jvmci_get_vm()
bfb7523ffc03 fixed jdkartifactstats for JDK9 and made get_vm() compatability for both mx_jvmci:8 and mx_jvmci:9
Doug Simon <doug.simon@oracle.com>
parents: 22799
diff changeset
51 if isinstance(vm, VM):
bfb7523ffc03 fixed jdkartifactstats for JDK9 and made get_vm() compatability for both mx_jvmci:8 and mx_jvmci:9
Doug Simon <doug.simon@oracle.com>
parents: 22799
diff changeset
52 # mx_jvmci:9
bfb7523ffc03 fixed jdkartifactstats for JDK9 and made get_vm() compatability for both mx_jvmci:8 and mx_jvmci:9
Doug Simon <doug.simon@oracle.com>
parents: 22799
diff changeset
53 return vm.jvmVariant
bfb7523ffc03 fixed jdkartifactstats for JDK9 and made get_vm() compatability for both mx_jvmci:8 and mx_jvmci:9
Doug Simon <doug.simon@oracle.com>
parents: 22799
diff changeset
54 else:
bfb7523ffc03 fixed jdkartifactstats for JDK9 and made get_vm() compatability for both mx_jvmci:8 and mx_jvmci:9
Doug Simon <doug.simon@oracle.com>
parents: 22799
diff changeset
55 # mx_jvmci:8
bfb7523ffc03 fixed jdkartifactstats for JDK9 and made get_vm() compatability for both mx_jvmci:8 and mx_jvmci:9
Doug Simon <doug.simon@oracle.com>
parents: 22799
diff changeset
56 assert isinstance(vm, str)
bfb7523ffc03 fixed jdkartifactstats for JDK9 and made get_vm() compatability for both mx_jvmci:8 and mx_jvmci:9
Doug Simon <doug.simon@oracle.com>
parents: 22799
diff changeset
57 return vm
bfb7523ffc03 fixed jdkartifactstats for JDK9 and made get_vm() compatability for both mx_jvmci:8 and mx_jvmci:9
Doug Simon <doug.simon@oracle.com>
parents: 22799
diff changeset
58
22285
3bf1bdd3c0c3 Use new jdk deployed dists model
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents: 22275
diff changeset
59 class GraalJDKDeployedDist(JvmciJDKDeployedDist):
22147
b50bd2ed6779 adapted to JDKDeployedDist.postJdkInstall changing to onPostJdkInstall() method
Doug Simon <doug.simon@oracle.com>
parents: 22145
diff changeset
60 def __init__(self):
22593
a107ab4c3011 make processing of <jre>/lib/jvmci/*.properties file like other Java *.properties files in that the last definition of any propery "wins"
Doug Simon <doug.simon@oracle.com>
parents: 22542
diff changeset
61 JvmciJDKDeployedDist.__init__(self, 'GRAAL_HOTSPOT', compilers=['graal-economy', 'graal'])
9095
d538dce8f403 support for non-GRAAL VMs co-existing with GRAAL VMs
Doug Simon <doug.simon@oracle.com>
parents: 9010
diff changeset
62
22285
3bf1bdd3c0c3 Use new jdk deployed dists model
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents: 22275
diff changeset
63 def deploy(self, jdkDir):
3bf1bdd3c0c3 Use new jdk deployed dists model
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents: 22275
diff changeset
64 JvmciJDKDeployedDist.deploy(self, jdkDir)
22147
b50bd2ed6779 adapted to JDKDeployedDist.postJdkInstall changing to onPostJdkInstall() method
Doug Simon <doug.simon@oracle.com>
parents: 22145
diff changeset
65 self._updateGraalPropertiesFile(join(jdkDir, 'jre', 'lib'))
3718
42e655a6a6f3 Added mx configuration.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
66
22147
b50bd2ed6779 adapted to JDKDeployedDist.postJdkInstall changing to onPostJdkInstall() method
Doug Simon <doug.simon@oracle.com>
parents: 22145
diff changeset
67 def _updateGraalPropertiesFile(self, jreLibDir):
b50bd2ed6779 adapted to JDKDeployedDist.postJdkInstall changing to onPostJdkInstall() method
Doug Simon <doug.simon@oracle.com>
parents: 22145
diff changeset
68 """
b50bd2ed6779 adapted to JDKDeployedDist.postJdkInstall changing to onPostJdkInstall() method
Doug Simon <doug.simon@oracle.com>
parents: 22145
diff changeset
69 Updates (or creates) 'jreLibDir'/jvmci/graal.properties to set/modify the
b50bd2ed6779 adapted to JDKDeployedDist.postJdkInstall changing to onPostJdkInstall() method
Doug Simon <doug.simon@oracle.com>
parents: 22145
diff changeset
70 graal.version property.
b50bd2ed6779 adapted to JDKDeployedDist.postJdkInstall changing to onPostJdkInstall() method
Doug Simon <doug.simon@oracle.com>
parents: 22145
diff changeset
71 """
b50bd2ed6779 adapted to JDKDeployedDist.postJdkInstall changing to onPostJdkInstall() method
Doug Simon <doug.simon@oracle.com>
parents: 22145
diff changeset
72 version = _suite.release_version()
b50bd2ed6779 adapted to JDKDeployedDist.postJdkInstall changing to onPostJdkInstall() method
Doug Simon <doug.simon@oracle.com>
parents: 22145
diff changeset
73 graalProperties = join(jreLibDir, 'jvmci', 'graal.properties')
b50bd2ed6779 adapted to JDKDeployedDist.postJdkInstall changing to onPostJdkInstall() method
Doug Simon <doug.simon@oracle.com>
parents: 22145
diff changeset
74 if not exists(graalProperties):
b50bd2ed6779 adapted to JDKDeployedDist.postJdkInstall changing to onPostJdkInstall() method
Doug Simon <doug.simon@oracle.com>
parents: 22145
diff changeset
75 with open(graalProperties, 'w') as fp:
b50bd2ed6779 adapted to JDKDeployedDist.postJdkInstall changing to onPostJdkInstall() method
Doug Simon <doug.simon@oracle.com>
parents: 22145
diff changeset
76 print >> fp, 'graal.version=' + version
b50bd2ed6779 adapted to JDKDeployedDist.postJdkInstall changing to onPostJdkInstall() method
Doug Simon <doug.simon@oracle.com>
parents: 22145
diff changeset
77 else:
b50bd2ed6779 adapted to JDKDeployedDist.postJdkInstall changing to onPostJdkInstall() method
Doug Simon <doug.simon@oracle.com>
parents: 22145
diff changeset
78 content = []
b50bd2ed6779 adapted to JDKDeployedDist.postJdkInstall changing to onPostJdkInstall() method
Doug Simon <doug.simon@oracle.com>
parents: 22145
diff changeset
79 with open(graalProperties) as fp:
b50bd2ed6779 adapted to JDKDeployedDist.postJdkInstall changing to onPostJdkInstall() method
Doug Simon <doug.simon@oracle.com>
parents: 22145
diff changeset
80 for line in fp:
b50bd2ed6779 adapted to JDKDeployedDist.postJdkInstall changing to onPostJdkInstall() method
Doug Simon <doug.simon@oracle.com>
parents: 22145
diff changeset
81 if line.startswith('graal.version='):
b50bd2ed6779 adapted to JDKDeployedDist.postJdkInstall changing to onPostJdkInstall() method
Doug Simon <doug.simon@oracle.com>
parents: 22145
diff changeset
82 content.append('graal.version=' + version)
b50bd2ed6779 adapted to JDKDeployedDist.postJdkInstall changing to onPostJdkInstall() method
Doug Simon <doug.simon@oracle.com>
parents: 22145
diff changeset
83 else:
b50bd2ed6779 adapted to JDKDeployedDist.postJdkInstall changing to onPostJdkInstall() method
Doug Simon <doug.simon@oracle.com>
parents: 22145
diff changeset
84 content.append(line.rstrip(os.linesep))
b50bd2ed6779 adapted to JDKDeployedDist.postJdkInstall changing to onPostJdkInstall() method
Doug Simon <doug.simon@oracle.com>
parents: 22145
diff changeset
85 with open(graalProperties, 'w') as fp:
b50bd2ed6779 adapted to JDKDeployedDist.postJdkInstall changing to onPostJdkInstall() method
Doug Simon <doug.simon@oracle.com>
parents: 22145
diff changeset
86 fp.write(os.linesep.join(content))
7916
9bff64f43299 Better java version numbers support in mx
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 7788
diff changeset
87
22753
f74225bf6671 changes for compatibility with jvmci-9
Doug Simon <doug.simon@oracle.com>
parents: 22667
diff changeset
88 jdkDeployedDists += [
22320
b1ed20090527 Resolve cyclic dependencies involving annotation processors.
Roland Schatz <roland.schatz@oracle.com>
parents: 22319
diff changeset
89 JvmciJDKDeployedDist('GRAAL_NODEINFO'),
b1ed20090527 Resolve cyclic dependencies involving annotation processors.
Roland Schatz <roland.schatz@oracle.com>
parents: 22319
diff changeset
90 JvmciJDKDeployedDist('GRAAL_API'),
b1ed20090527 Resolve cyclic dependencies involving annotation processors.
Roland Schatz <roland.schatz@oracle.com>
parents: 22319
diff changeset
91 JvmciJDKDeployedDist('GRAAL_COMPILER'),
22491
e6a7022319a9 Put HotSpot-specific projects in their own distribution
Christian Wimmer <christian.wimmer@oracle.com>
parents: 22471
diff changeset
92 JvmciJDKDeployedDist('GRAAL'),
22147
b50bd2ed6779 adapted to JDKDeployedDist.postJdkInstall changing to onPostJdkInstall() method
Doug Simon <doug.simon@oracle.com>
parents: 22145
diff changeset
93 GraalJDKDeployedDist(),
22285
3bf1bdd3c0c3 Use new jdk deployed dists model
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents: 22275
diff changeset
94 JvmciJDKDeployedDist('GRAAL_TRUFFLE'),
22495
c9410ab830e0 Add missing deployment distribution
Christian Wimmer <christian.wimmer@oracle.com>
parents: 22491
diff changeset
95 JvmciJDKDeployedDist('GRAAL_TRUFFLE_HOTSPOT'),
16902
0583d157992a formalized the set of distribution jars that are installed into the JDK to ensure both mx and the HotSpot make system do the necessary deployment
Doug Simon <doug.simon@oracle.com>
parents: 16877
diff changeset
96 ]
0583d157992a formalized the set of distribution jars that are installed into the JDK to ensure both mx and the HotSpot make system do the necessary deployment
Doug Simon <doug.simon@oracle.com>
parents: 16877
diff changeset
97
22291
d2ec93b0a88e moved gate from mx_jvmci.py to mx_gate.py in core mx
Doug Simon <doug.simon@oracle.com>
parents: 22285
diff changeset
98 mx_gate.add_jacoco_includes(['com.oracle.graal.*'])
d2ec93b0a88e moved gate from mx_jvmci.py to mx_gate.py in core mx
Doug Simon <doug.simon@oracle.com>
parents: 22285
diff changeset
99 mx_gate.add_jacoco_excluded_annotations(['@Snippet', '@ClassSubstitution'])
15405
5dcf0ae606f3 mx: new export command
Bernhard Urban <bernhard.urban@jku.at>
parents: 15404
diff changeset
100
11367
39b86b83ddeb normalized the command line interface for the dacapo, scaladacapo, specjvm2008, specjbb2005 and specjbb2013 commands
Doug Simon <doug.simon@oracle.com>
parents: 11359
diff changeset
101 def _run_benchmark(args, availableBenchmarks, runBenchmark):
39b86b83ddeb normalized the command line interface for the dacapo, scaladacapo, specjvm2008, specjbb2005 and specjbb2013 commands
Doug Simon <doug.simon@oracle.com>
parents: 11359
diff changeset
102
22020
36a7ec14279d moved unit test support from mx_graal.py to mx.py
Doug Simon <doug.simon@oracle.com>
parents: 22019
diff changeset
103 vmOpts, benchmarksAndOptions = mx.extract_VM_args(args, useDoubleDash=availableBenchmarks is None)
5729
dab877fe7c31 prevented error during mx site from corrupting an existing site
Doug Simon <doug.simon@oracle.com>
parents: 5708
diff changeset
104
11367
39b86b83ddeb normalized the command line interface for the dacapo, scaladacapo, specjvm2008, specjbb2005 and specjbb2013 commands
Doug Simon <doug.simon@oracle.com>
parents: 11359
diff changeset
105 if availableBenchmarks is None:
11514
dc3c8df55905 added support for pylint and fixed errors/warnings it found
Doug Simon <doug.simon@oracle.com>
parents: 11512
diff changeset
106 harnessArgs = benchmarksAndOptions
11367
39b86b83ddeb normalized the command line interface for the dacapo, scaladacapo, specjvm2008, specjbb2005 and specjbb2013 commands
Doug Simon <doug.simon@oracle.com>
parents: 11359
diff changeset
107 return runBenchmark(None, harnessArgs, vmOpts)
4215
a2caa019ba3a Fix mx : commands' scripts mx_init hook should be called before parsing command line arguments.
Gilles Duboscq <gilles.m.duboscq@gmail.com>
parents: 4187
diff changeset
108
11367
39b86b83ddeb normalized the command line interface for the dacapo, scaladacapo, specjvm2008, specjbb2005 and specjbb2013 commands
Doug Simon <doug.simon@oracle.com>
parents: 11359
diff changeset
109 if len(benchmarksAndOptions) == 0:
39b86b83ddeb normalized the command line interface for the dacapo, scaladacapo, specjvm2008, specjbb2005 and specjbb2013 commands
Doug Simon <doug.simon@oracle.com>
parents: 11359
diff changeset
110 mx.abort('at least one benchmark name or "all" must be specified')
39b86b83ddeb normalized the command line interface for the dacapo, scaladacapo, specjvm2008, specjbb2005 and specjbb2013 commands
Doug Simon <doug.simon@oracle.com>
parents: 11359
diff changeset
111 benchmarks = list(itertools.takewhile(lambda x: not x.startswith('-'), benchmarksAndOptions))
11514
dc3c8df55905 added support for pylint and fixed errors/warnings it found
Doug Simon <doug.simon@oracle.com>
parents: 11512
diff changeset
112 harnessArgs = benchmarksAndOptions[len(benchmarks):]
5729
dab877fe7c31 prevented error during mx site from corrupting an existing site
Doug Simon <doug.simon@oracle.com>
parents: 5708
diff changeset
113
11367
39b86b83ddeb normalized the command line interface for the dacapo, scaladacapo, specjvm2008, specjbb2005 and specjbb2013 commands
Doug Simon <doug.simon@oracle.com>
parents: 11359
diff changeset
114 if 'all' in benchmarks:
39b86b83ddeb normalized the command line interface for the dacapo, scaladacapo, specjvm2008, specjbb2005 and specjbb2013 commands
Doug Simon <doug.simon@oracle.com>
parents: 11359
diff changeset
115 benchmarks = availableBenchmarks
39b86b83ddeb normalized the command line interface for the dacapo, scaladacapo, specjvm2008, specjbb2005 and specjbb2013 commands
Doug Simon <doug.simon@oracle.com>
parents: 11359
diff changeset
116 else:
39b86b83ddeb normalized the command line interface for the dacapo, scaladacapo, specjvm2008, specjbb2005 and specjbb2013 commands
Doug Simon <doug.simon@oracle.com>
parents: 11359
diff changeset
117 for bm in benchmarks:
39b86b83ddeb normalized the command line interface for the dacapo, scaladacapo, specjvm2008, specjbb2005 and specjbb2013 commands
Doug Simon <doug.simon@oracle.com>
parents: 11359
diff changeset
118 if bm not in availableBenchmarks:
39b86b83ddeb normalized the command line interface for the dacapo, scaladacapo, specjvm2008, specjbb2005 and specjbb2013 commands
Doug Simon <doug.simon@oracle.com>
parents: 11359
diff changeset
119 mx.abort('unknown benchmark: ' + bm + '\nselect one of: ' + str(availableBenchmarks))
5729
dab877fe7c31 prevented error during mx site from corrupting an existing site
Doug Simon <doug.simon@oracle.com>
parents: 5708
diff changeset
120
4215
a2caa019ba3a Fix mx : commands' scripts mx_init hook should be called before parsing command line arguments.
Gilles Duboscq <gilles.m.duboscq@gmail.com>
parents: 4187
diff changeset
121 failed = []
11367
39b86b83ddeb normalized the command line interface for the dacapo, scaladacapo, specjvm2008, specjbb2005 and specjbb2013 commands
Doug Simon <doug.simon@oracle.com>
parents: 11359
diff changeset
122 for bm in benchmarks:
39b86b83ddeb normalized the command line interface for the dacapo, scaladacapo, specjvm2008, specjbb2005 and specjbb2013 commands
Doug Simon <doug.simon@oracle.com>
parents: 11359
diff changeset
123 if not runBenchmark(bm, harnessArgs, vmOpts):
39b86b83ddeb normalized the command line interface for the dacapo, scaladacapo, specjvm2008, specjbb2005 and specjbb2013 commands
Doug Simon <doug.simon@oracle.com>
parents: 11359
diff changeset
124 failed.append(bm)
5729
dab877fe7c31 prevented error during mx site from corrupting an existing site
Doug Simon <doug.simon@oracle.com>
parents: 5708
diff changeset
125
4157
b26279781d95 Simplified 'dacapo' command and made it more suitable for gate usage.
Doug Simon <doug.simon@oracle.com>
parents: 4156
diff changeset
126 if len(failed) != 0:
11367
39b86b83ddeb normalized the command line interface for the dacapo, scaladacapo, specjvm2008, specjbb2005 and specjbb2013 commands
Doug Simon <doug.simon@oracle.com>
parents: 11359
diff changeset
127 mx.abort('Benchmark failures: ' + str(failed))
39b86b83ddeb normalized the command line interface for the dacapo, scaladacapo, specjvm2008, specjbb2005 and specjbb2013 commands
Doug Simon <doug.simon@oracle.com>
parents: 11359
diff changeset
128
39b86b83ddeb normalized the command line interface for the dacapo, scaladacapo, specjvm2008, specjbb2005 and specjbb2013 commands
Doug Simon <doug.simon@oracle.com>
parents: 11359
diff changeset
129 def dacapo(args):
39b86b83ddeb normalized the command line interface for the dacapo, scaladacapo, specjvm2008, specjbb2005 and specjbb2013 commands
Doug Simon <doug.simon@oracle.com>
parents: 11359
diff changeset
130 """run one or more DaCapo benchmarks"""
39b86b83ddeb normalized the command line interface for the dacapo, scaladacapo, specjvm2008, specjbb2005 and specjbb2013 commands
Doug Simon <doug.simon@oracle.com>
parents: 11359
diff changeset
131
39b86b83ddeb normalized the command line interface for the dacapo, scaladacapo, specjvm2008, specjbb2005 and specjbb2013 commands
Doug Simon <doug.simon@oracle.com>
parents: 11359
diff changeset
132 def launcher(bm, harnessArgs, extraVmOpts):
22139
258eaaa98484 Initial split off from monolithic basic-graal repo
Doug Simon <doug.simon@oracle.com>
parents: 22108
diff changeset
133 return sanitycheck.getDacapo(bm, harnessArgs).test(get_vm(), extraVmOpts=extraVmOpts)
11514
dc3c8df55905 added support for pylint and fixed errors/warnings it found
Doug Simon <doug.simon@oracle.com>
parents: 11512
diff changeset
134
11367
39b86b83ddeb normalized the command line interface for the dacapo, scaladacapo, specjvm2008, specjbb2005 and specjbb2013 commands
Doug Simon <doug.simon@oracle.com>
parents: 11359
diff changeset
135 _run_benchmark(args, sanitycheck.dacapoSanityWarmup.keys(), launcher)
5729
dab877fe7c31 prevented error during mx site from corrupting an existing site
Doug Simon <doug.simon@oracle.com>
parents: 5708
diff changeset
136
4480
7d6490436b57 Add Scala DaCapo benchs
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 4438
diff changeset
137 def scaladacapo(args):
11367
39b86b83ddeb normalized the command line interface for the dacapo, scaladacapo, specjvm2008, specjbb2005 and specjbb2013 commands
Doug Simon <doug.simon@oracle.com>
parents: 11359
diff changeset
138 """run one or more Scala DaCapo benchmarks"""
5729
dab877fe7c31 prevented error during mx site from corrupting an existing site
Doug Simon <doug.simon@oracle.com>
parents: 5708
diff changeset
139
11367
39b86b83ddeb normalized the command line interface for the dacapo, scaladacapo, specjvm2008, specjbb2005 and specjbb2013 commands
Doug Simon <doug.simon@oracle.com>
parents: 11359
diff changeset
140 def launcher(bm, harnessArgs, extraVmOpts):
22139
258eaaa98484 Initial split off from monolithic basic-graal repo
Doug Simon <doug.simon@oracle.com>
parents: 22108
diff changeset
141 return sanitycheck.getScalaDacapo(bm, harnessArgs).test(get_vm(), extraVmOpts=extraVmOpts)
5729
dab877fe7c31 prevented error during mx site from corrupting an existing site
Doug Simon <doug.simon@oracle.com>
parents: 5708
diff changeset
142
11367
39b86b83ddeb normalized the command line interface for the dacapo, scaladacapo, specjvm2008, specjbb2005 and specjbb2013 commands
Doug Simon <doug.simon@oracle.com>
parents: 11359
diff changeset
143 _run_benchmark(args, sanitycheck.dacapoScalaSanityWarmup.keys(), launcher)
4584
7e5d8d1c74a1 Modified JDK replication process such that a copy of the default VM is made. This prevents issues with the replicated JDK being used to bootstrap a HotSpot build.
Doug Simon <doug.simon@oracle.com>
parents: 4582
diff changeset
144
22542
c35e3fccb8da adapted to jvmci changes
Doug Simon <doug.simon@oracle.com>
parents: 22525
diff changeset
145 # This is different than the 'jmh' commmand in that it
c35e3fccb8da adapted to jvmci changes
Doug Simon <doug.simon@oracle.com>
parents: 22525
diff changeset
146 # looks for internal JMH benchmarks (i.e. those that
c35e3fccb8da adapted to jvmci changes
Doug Simon <doug.simon@oracle.com>
parents: 22525
diff changeset
147 # depend on the JMH library).
18897
9afee75cee46 mx: add microbench command to run JMH benchmarks
Roland Schatz <roland.schatz@oracle.com>
parents: 18894
diff changeset
148 def microbench(args):
9afee75cee46 mx: add microbench command to run JMH benchmarks
Roland Schatz <roland.schatz@oracle.com>
parents: 18894
diff changeset
149 """run JMH microbenchmark projects"""
22764
40a8dedf1554 mx microbench: add support external JMH jars using the --jar argument.
Josef Eisl <josef.eisl@jku.at>
parents: 22753
diff changeset
150 parser = ArgumentParser(prog='mx microbench', description=microbench.__doc__,
40a8dedf1554 mx microbench: add support external JMH jars using the --jar argument.
Josef Eisl <josef.eisl@jku.at>
parents: 22753
diff changeset
151 usage="%(prog)s [command options|VM options] [-- [JMH options]]")
40a8dedf1554 mx microbench: add support external JMH jars using the --jar argument.
Josef Eisl <josef.eisl@jku.at>
parents: 22753
diff changeset
152 parser.add_argument('--jar', help='Explicitly specify micro-benchmark location')
40a8dedf1554 mx microbench: add support external JMH jars using the --jar argument.
Josef Eisl <josef.eisl@jku.at>
parents: 22753
diff changeset
153 known_args, args = parser.parse_known_args(args)
40a8dedf1554 mx microbench: add support external JMH jars using the --jar argument.
Josef Eisl <josef.eisl@jku.at>
parents: 22753
diff changeset
154
22020
36a7ec14279d moved unit test support from mx_graal.py to mx.py
Doug Simon <doug.simon@oracle.com>
parents: 22019
diff changeset
155 vmArgs, jmhArgs = mx.extract_VM_args(args, useDoubleDash=True)
22800
bfb7523ffc03 fixed jdkartifactstats for JDK9 and made get_vm() compatability for both mx_jvmci:8 and mx_jvmci:9
Doug Simon <doug.simon@oracle.com>
parents: 22799
diff changeset
156 if get_jvmci_jdk().javaCompliance < '9':
bfb7523ffc03 fixed jdkartifactstats for JDK9 and made get_vm() compatability for both mx_jvmci:8 and mx_jvmci:9
Doug Simon <doug.simon@oracle.com>
parents: 22799
diff changeset
157 if isJVMCIEnabled(get_vm()) and '-XX:-UseJVMCIClassLoader' not in vmArgs:
bfb7523ffc03 fixed jdkartifactstats for JDK9 and made get_vm() compatability for both mx_jvmci:8 and mx_jvmci:9
Doug Simon <doug.simon@oracle.com>
parents: 22799
diff changeset
158 vmArgs = ['-XX:-UseJVMCIClassLoader'] + vmArgs
18897
9afee75cee46 mx: add microbench command to run JMH benchmarks
Roland Schatz <roland.schatz@oracle.com>
parents: 18894
diff changeset
159
9afee75cee46 mx: add microbench command to run JMH benchmarks
Roland Schatz <roland.schatz@oracle.com>
parents: 18894
diff changeset
160 # look for -f in JMH arguments
9afee75cee46 mx: add microbench command to run JMH benchmarks
Roland Schatz <roland.schatz@oracle.com>
parents: 18894
diff changeset
161 containsF = False
9afee75cee46 mx: add microbench command to run JMH benchmarks
Roland Schatz <roland.schatz@oracle.com>
parents: 18894
diff changeset
162 forking = True
9afee75cee46 mx: add microbench command to run JMH benchmarks
Roland Schatz <roland.schatz@oracle.com>
parents: 18894
diff changeset
163 for i in range(len(jmhArgs)):
9afee75cee46 mx: add microbench command to run JMH benchmarks
Roland Schatz <roland.schatz@oracle.com>
parents: 18894
diff changeset
164 arg = jmhArgs[i]
9afee75cee46 mx: add microbench command to run JMH benchmarks
Roland Schatz <roland.schatz@oracle.com>
parents: 18894
diff changeset
165 if arg.startswith('-f'):
9afee75cee46 mx: add microbench command to run JMH benchmarks
Roland Schatz <roland.schatz@oracle.com>
parents: 18894
diff changeset
166 containsF = True
9afee75cee46 mx: add microbench command to run JMH benchmarks
Roland Schatz <roland.schatz@oracle.com>
parents: 18894
diff changeset
167 if arg == '-f' and (i+1) < len(jmhArgs):
9afee75cee46 mx: add microbench command to run JMH benchmarks
Roland Schatz <roland.schatz@oracle.com>
parents: 18894
diff changeset
168 arg += jmhArgs[i+1]
9afee75cee46 mx: add microbench command to run JMH benchmarks
Roland Schatz <roland.schatz@oracle.com>
parents: 18894
diff changeset
169 try:
9afee75cee46 mx: add microbench command to run JMH benchmarks
Roland Schatz <roland.schatz@oracle.com>
parents: 18894
diff changeset
170 if int(arg[2:]) == 0:
9afee75cee46 mx: add microbench command to run JMH benchmarks
Roland Schatz <roland.schatz@oracle.com>
parents: 18894
diff changeset
171 forking = False
9afee75cee46 mx: add microbench command to run JMH benchmarks
Roland Schatz <roland.schatz@oracle.com>
parents: 18894
diff changeset
172 except ValueError:
9afee75cee46 mx: add microbench command to run JMH benchmarks
Roland Schatz <roland.schatz@oracle.com>
parents: 18894
diff changeset
173 pass
9afee75cee46 mx: add microbench command to run JMH benchmarks
Roland Schatz <roland.schatz@oracle.com>
parents: 18894
diff changeset
174
22764
40a8dedf1554 mx microbench: add support external JMH jars using the --jar argument.
Josef Eisl <josef.eisl@jku.at>
parents: 22753
diff changeset
175 if known_args.jar:
40a8dedf1554 mx microbench: add support external JMH jars using the --jar argument.
Josef Eisl <josef.eisl@jku.at>
parents: 22753
diff changeset
176 # use the specified jar
40a8dedf1554 mx microbench: add support external JMH jars using the --jar argument.
Josef Eisl <josef.eisl@jku.at>
parents: 22753
diff changeset
177 args = ['-jar', known_args.jar]
40a8dedf1554 mx microbench: add support external JMH jars using the --jar argument.
Josef Eisl <josef.eisl@jku.at>
parents: 22753
diff changeset
178 if not forking:
40a8dedf1554 mx microbench: add support external JMH jars using the --jar argument.
Josef Eisl <josef.eisl@jku.at>
parents: 22753
diff changeset
179 args += vmArgs
40a8dedf1554 mx microbench: add support external JMH jars using the --jar argument.
Josef Eisl <josef.eisl@jku.at>
parents: 22753
diff changeset
180 else:
40a8dedf1554 mx microbench: add support external JMH jars using the --jar argument.
Josef Eisl <josef.eisl@jku.at>
parents: 22753
diff changeset
181 # default to -f1 if not specified otherwise
40a8dedf1554 mx microbench: add support external JMH jars using the --jar argument.
Josef Eisl <josef.eisl@jku.at>
parents: 22753
diff changeset
182 if not containsF:
40a8dedf1554 mx microbench: add support external JMH jars using the --jar argument.
Josef Eisl <josef.eisl@jku.at>
parents: 22753
diff changeset
183 jmhArgs += ['-f1']
18897
9afee75cee46 mx: add microbench command to run JMH benchmarks
Roland Schatz <roland.schatz@oracle.com>
parents: 18894
diff changeset
184
22764
40a8dedf1554 mx microbench: add support external JMH jars using the --jar argument.
Josef Eisl <josef.eisl@jku.at>
parents: 22753
diff changeset
185 # find all projects with a direct JMH dependency
40a8dedf1554 mx microbench: add support external JMH jars using the --jar argument.
Josef Eisl <josef.eisl@jku.at>
parents: 22753
diff changeset
186 jmhProjects = []
40a8dedf1554 mx microbench: add support external JMH jars using the --jar argument.
Josef Eisl <josef.eisl@jku.at>
parents: 22753
diff changeset
187 for p in mx.projects_opt_limit_to_suites():
40a8dedf1554 mx microbench: add support external JMH jars using the --jar argument.
Josef Eisl <josef.eisl@jku.at>
parents: 22753
diff changeset
188 if 'JMH' in [x.name for x in p.deps]:
40a8dedf1554 mx microbench: add support external JMH jars using the --jar argument.
Josef Eisl <josef.eisl@jku.at>
parents: 22753
diff changeset
189 jmhProjects.append(p.name)
40a8dedf1554 mx microbench: add support external JMH jars using the --jar argument.
Josef Eisl <josef.eisl@jku.at>
parents: 22753
diff changeset
190 cp = mx.classpath(jmhProjects)
18897
9afee75cee46 mx: add microbench command to run JMH benchmarks
Roland Schatz <roland.schatz@oracle.com>
parents: 18894
diff changeset
191
22764
40a8dedf1554 mx microbench: add support external JMH jars using the --jar argument.
Josef Eisl <josef.eisl@jku.at>
parents: 22753
diff changeset
192 # execute JMH runner
40a8dedf1554 mx microbench: add support external JMH jars using the --jar argument.
Josef Eisl <josef.eisl@jku.at>
parents: 22753
diff changeset
193 args = ['-cp', cp]
40a8dedf1554 mx microbench: add support external JMH jars using the --jar argument.
Josef Eisl <josef.eisl@jku.at>
parents: 22753
diff changeset
194 if not forking:
40a8dedf1554 mx microbench: add support external JMH jars using the --jar argument.
Josef Eisl <josef.eisl@jku.at>
parents: 22753
diff changeset
195 args += vmArgs
40a8dedf1554 mx microbench: add support external JMH jars using the --jar argument.
Josef Eisl <josef.eisl@jku.at>
parents: 22753
diff changeset
196 args += ['org.openjdk.jmh.Main']
40a8dedf1554 mx microbench: add support external JMH jars using the --jar argument.
Josef Eisl <josef.eisl@jku.at>
parents: 22753
diff changeset
197
18897
9afee75cee46 mx: add microbench command to run JMH benchmarks
Roland Schatz <roland.schatz@oracle.com>
parents: 18894
diff changeset
198 if forking:
22542
c35e3fccb8da adapted to jvmci changes
Doug Simon <doug.simon@oracle.com>
parents: 22525
diff changeset
199 jdk = get_jvmci_jdk()
c35e3fccb8da adapted to jvmci changes
Doug Simon <doug.simon@oracle.com>
parents: 22525
diff changeset
200 jvm = get_vm()
22525
ae41a292cef1 mx microbench: quote forked vmArgs with spaces.
Josef Eisl <josef.eisl@jku.at>
parents: 22524
diff changeset
201 def quoteSpace(s):
ae41a292cef1 mx microbench: quote forked vmArgs with spaces.
Josef Eisl <josef.eisl@jku.at>
parents: 22524
diff changeset
202 if " " in s:
ae41a292cef1 mx microbench: quote forked vmArgs with spaces.
Josef Eisl <josef.eisl@jku.at>
parents: 22524
diff changeset
203 return '"' + s + '"'
ae41a292cef1 mx microbench: quote forked vmArgs with spaces.
Josef Eisl <josef.eisl@jku.at>
parents: 22524
diff changeset
204 return s
ae41a292cef1 mx microbench: quote forked vmArgs with spaces.
Josef Eisl <josef.eisl@jku.at>
parents: 22524
diff changeset
205
22542
c35e3fccb8da adapted to jvmci changes
Doug Simon <doug.simon@oracle.com>
parents: 22525
diff changeset
206 forkedVmArgs = map(quoteSpace, jdk.parseVmArgs(vmArgs))
22524
802ed515704a mx microbench: use forkedVmArgs.
Josef Eisl <josef.eisl@jku.at>
parents: 22523
diff changeset
207 args += ['--jvmArgsPrepend', ' '.join(['-' + jvm] + forkedVmArgs)]
22542
c35e3fccb8da adapted to jvmci changes
Doug Simon <doug.simon@oracle.com>
parents: 22525
diff changeset
208 run_vm(args + jmhArgs)
18897
9afee75cee46 mx: add microbench command to run JMH benchmarks
Roland Schatz <roland.schatz@oracle.com>
parents: 18894
diff changeset
209
22792
087d6b3e4c9b mx gate: add support for --extra-vm-argument.
Josef Eisl <josef.eisl@jku.at>
parents: 22786
diff changeset
210 def ctw(args, extraVMarguments=None):
17052
35fda668ed6e mx: added ctw command to simplify executing CompileTheWorld
Doug Simon <doug.simon@oracle.com>
parents: 17015
diff changeset
211 """run CompileTheWorld"""
17372
d42e11af980d mx: simplified ctw command
Doug Simon <doug.simon@oracle.com>
parents: 17363
diff changeset
212
18106
7a771b48e392 mx: improved ctw command usage message and made the default value for --ctwopts be "-Inline"
Doug Simon <doug.simon@oracle.com>
parents: 17438
diff changeset
213 defaultCtwopts = '-Inline'
7a771b48e392 mx: improved ctw command usage message and made the default value for --ctwopts be "-Inline"
Doug Simon <doug.simon@oracle.com>
parents: 17438
diff changeset
214
17372
d42e11af980d mx: simplified ctw command
Doug Simon <doug.simon@oracle.com>
parents: 17363
diff changeset
215 parser = ArgumentParser(prog='mx ctw')
21559
be896a1983c0 recast all Graal native code as JVMCI code (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21554
diff changeset
216 parser.add_argument('--ctwopts', action='store', help='space separated JVMCI options used for CTW compilations (default: --ctwopts="' + defaultCtwopts + '")', default=defaultCtwopts, metavar='<options>')
22797
9329eb8678f7 fixed CompileTheWorld functionality for jdk9
Doug Simon <doug.simon@oracle.com>
parents: 22792
diff changeset
217 parser.add_argument('--cp', '--jar', action='store', help='jar or class path denoting classes to compile', metavar='<path>')
17372
d42e11af980d mx: simplified ctw command
Doug Simon <doug.simon@oracle.com>
parents: 17363
diff changeset
218
d42e11af980d mx: simplified ctw command
Doug Simon <doug.simon@oracle.com>
parents: 17363
diff changeset
219 args, vmargs = parser.parse_known_args(args)
17052
35fda668ed6e mx: added ctw command to simplify executing CompileTheWorld
Doug Simon <doug.simon@oracle.com>
parents: 17015
diff changeset
220
17372
d42e11af980d mx: simplified ctw command
Doug Simon <doug.simon@oracle.com>
parents: 17363
diff changeset
221 if args.ctwopts:
22405
0d437f833141 moved JVMCI option parsing back into Java
Doug Simon <doug.simon@oracle.com>
parents: 22390
diff changeset
222 # Replace spaces with '#' since -G: options cannot contain spaces
0d437f833141 moved JVMCI option parsing back into Java
Doug Simon <doug.simon@oracle.com>
parents: 22390
diff changeset
223 # when they are collated in the "jvmci.options" system property
0d437f833141 moved JVMCI option parsing back into Java
Doug Simon <doug.simon@oracle.com>
parents: 22390
diff changeset
224 vmargs.append('-G:CompileTheWorldConfig=' + re.sub(r'\s+', '#', args.ctwopts))
17052
35fda668ed6e mx: added ctw command to simplify executing CompileTheWorld
Doug Simon <doug.simon@oracle.com>
parents: 17015
diff changeset
225
22797
9329eb8678f7 fixed CompileTheWorld functionality for jdk9
Doug Simon <doug.simon@oracle.com>
parents: 22792
diff changeset
226 if args.cp:
9329eb8678f7 fixed CompileTheWorld functionality for jdk9
Doug Simon <doug.simon@oracle.com>
parents: 22792
diff changeset
227 cp = os.path.abspath(args.cp)
17372
d42e11af980d mx: simplified ctw command
Doug Simon <doug.simon@oracle.com>
parents: 17363
diff changeset
228 else:
22797
9329eb8678f7 fixed CompileTheWorld functionality for jdk9
Doug Simon <doug.simon@oracle.com>
parents: 22792
diff changeset
229 if get_jvmci_jdk().javaCompliance < '9':
9329eb8678f7 fixed CompileTheWorld functionality for jdk9
Doug Simon <doug.simon@oracle.com>
parents: 22792
diff changeset
230 cp = join(get_jvmci_jdk().home, 'jre', 'lib', 'rt.jar')
9329eb8678f7 fixed CompileTheWorld functionality for jdk9
Doug Simon <doug.simon@oracle.com>
parents: 22792
diff changeset
231 else:
22811
8b6879d1ba16 made CompileTheWorld work with JDK9 .jimage files
Doug Simon <doug.simon@oracle.com>
parents: 22800
diff changeset
232 cp = join(get_jvmci_jdk().home, 'modules', 'java.base') + os.pathsep + \
8b6879d1ba16 made CompileTheWorld work with JDK9 .jimage files
Doug Simon <doug.simon@oracle.com>
parents: 22800
diff changeset
233 join(get_jvmci_jdk().home, 'lib', 'modules', 'bootmodules.jimage')
20967
f61ff7f01bc2 Add CompileTheWorldExcludeMethodFilter to CTW and remove sun.awt.X11 classes from default ctw mx target.
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 20922
diff changeset
234 vmargs.append('-G:CompileTheWorldExcludeMethodFilter=sun.awt.X11.*.*')
17372
d42e11af980d mx: simplified ctw command
Doug Simon <doug.simon@oracle.com>
parents: 17363
diff changeset
235
22503
c74d7f8a8ee6 Use Java based CTW command
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 22495
diff changeset
236 # suppress menubar and dock when running on Mac; exclude x11 classes as they may cause vm crashes (on Solaris)
c74d7f8a8ee6 Use Java based CTW command
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 22495
diff changeset
237 vmargs = ['-Djava.awt.headless=true'] + vmargs
c74d7f8a8ee6 Use Java based CTW command
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 22495
diff changeset
238
22797
9329eb8678f7 fixed CompileTheWorld functionality for jdk9
Doug Simon <doug.simon@oracle.com>
parents: 22792
diff changeset
239 vm = get_vm()
22800
bfb7523ffc03 fixed jdkartifactstats for JDK9 and made get_vm() compatability for both mx_jvmci:8 and mx_jvmci:9
Doug Simon <doug.simon@oracle.com>
parents: 22799
diff changeset
240 if get_jvmci_jdk().javaCompliance >= '9':
bfb7523ffc03 fixed jdkartifactstats for JDK9 and made get_vm() compatability for both mx_jvmci:8 and mx_jvmci:9
Doug Simon <doug.simon@oracle.com>
parents: 22799
diff changeset
241 jvmciMode = _jvmci_get_vm().jvmciMode
bfb7523ffc03 fixed jdkartifactstats for JDK9 and made get_vm() compatability for both mx_jvmci:8 and mx_jvmci:9
Doug Simon <doug.simon@oracle.com>
parents: 22799
diff changeset
242 if jvmciMode == 'disabled':
22797
9329eb8678f7 fixed CompileTheWorld functionality for jdk9
Doug Simon <doug.simon@oracle.com>
parents: 22792
diff changeset
243 vmargs += ['-XX:+CompileTheWorld', '-Xbootclasspath/p:' + cp]
9329eb8678f7 fixed CompileTheWorld functionality for jdk9
Doug Simon <doug.simon@oracle.com>
parents: 22792
diff changeset
244 else:
22800
bfb7523ffc03 fixed jdkartifactstats for JDK9 and made get_vm() compatability for both mx_jvmci:8 and mx_jvmci:9
Doug Simon <doug.simon@oracle.com>
parents: 22799
diff changeset
245 if jvmciMode == 'jit':
22797
9329eb8678f7 fixed CompileTheWorld functionality for jdk9
Doug Simon <doug.simon@oracle.com>
parents: 22792
diff changeset
246 vmargs += ['-XX:+BootstrapJVMCI']
9329eb8678f7 fixed CompileTheWorld functionality for jdk9
Doug Simon <doug.simon@oracle.com>
parents: 22792
diff changeset
247 vmargs += ['-G:CompileTheWorldClasspath=' + cp, 'com.oracle.graal.hotspot.CompileTheWorld']
17392
9c241dc74cfc mx: specify jar of classes differently depending on whether Graal is hosted or not
Doug Simon <doug.simon@oracle.com>
parents: 17388
diff changeset
248 else:
22797
9329eb8678f7 fixed CompileTheWorld functionality for jdk9
Doug Simon <doug.simon@oracle.com>
parents: 22792
diff changeset
249 if isJVMCIEnabled(vm):
9329eb8678f7 fixed CompileTheWorld functionality for jdk9
Doug Simon <doug.simon@oracle.com>
parents: 22792
diff changeset
250 if vm == 'jvmci':
9329eb8678f7 fixed CompileTheWorld functionality for jdk9
Doug Simon <doug.simon@oracle.com>
parents: 22792
diff changeset
251 vmargs += ['-XX:+BootstrapJVMCI']
9329eb8678f7 fixed CompileTheWorld functionality for jdk9
Doug Simon <doug.simon@oracle.com>
parents: 22792
diff changeset
252 vmargs += ['-G:CompileTheWorldClasspath=' + cp, '-XX:-UseJVMCIClassLoader', 'com.oracle.graal.hotspot.CompileTheWorld']
9329eb8678f7 fixed CompileTheWorld functionality for jdk9
Doug Simon <doug.simon@oracle.com>
parents: 22792
diff changeset
253 else:
9329eb8678f7 fixed CompileTheWorld functionality for jdk9
Doug Simon <doug.simon@oracle.com>
parents: 22792
diff changeset
254 vmargs += ['-XX:+CompileTheWorld', '-Xbootclasspath/p:' + cp]
20020
af1e4c16b00f suppress menubar and dock when running ctw on Mac
Doug Simon <doug.simon@oracle.com>
parents: 20012
diff changeset
255
22792
087d6b3e4c9b mx gate: add support for --extra-vm-argument.
Josef Eisl <josef.eisl@jku.at>
parents: 22786
diff changeset
256 run_vm(vmargs + _noneAsEmptyList(extraVMarguments))
17052
35fda668ed6e mx: added ctw command to simplify executing CompileTheWorld
Doug Simon <doug.simon@oracle.com>
parents: 17015
diff changeset
257
22329
c68c5babdecd Make graal gate configurable.
Roland Schatz <roland.schatz@oracle.com>
parents: 22327
diff changeset
258 class UnitTestRun:
c68c5babdecd Make graal gate configurable.
Roland Schatz <roland.schatz@oracle.com>
parents: 22327
diff changeset
259 def __init__(self, name, args):
c68c5babdecd Make graal gate configurable.
Roland Schatz <roland.schatz@oracle.com>
parents: 22327
diff changeset
260 self.name = name
c68c5babdecd Make graal gate configurable.
Roland Schatz <roland.schatz@oracle.com>
parents: 22327
diff changeset
261 self.args = args
c68c5babdecd Make graal gate configurable.
Roland Schatz <roland.schatz@oracle.com>
parents: 22327
diff changeset
262
22792
087d6b3e4c9b mx gate: add support for --extra-vm-argument.
Josef Eisl <josef.eisl@jku.at>
parents: 22786
diff changeset
263 def run(self, suites, tasks, extraVMarguments=None):
22329
c68c5babdecd Make graal gate configurable.
Roland Schatz <roland.schatz@oracle.com>
parents: 22327
diff changeset
264 for suite in suites:
c68c5babdecd Make graal gate configurable.
Roland Schatz <roland.schatz@oracle.com>
parents: 22327
diff changeset
265 with Task(self.name + ': hosted-product ' + suite, tasks) as t:
22792
087d6b3e4c9b mx gate: add support for --extra-vm-argument.
Josef Eisl <josef.eisl@jku.at>
parents: 22786
diff changeset
266 if t: unittest(['--suite', suite, '--enable-timing', '--verbose', '--fail-fast'] + self.args + _noneAsEmptyList(extraVMarguments))
22329
c68c5babdecd Make graal gate configurable.
Roland Schatz <roland.schatz@oracle.com>
parents: 22327
diff changeset
267
c68c5babdecd Make graal gate configurable.
Roland Schatz <roland.schatz@oracle.com>
parents: 22327
diff changeset
268 class BootstrapTest:
c68c5babdecd Make graal gate configurable.
Roland Schatz <roland.schatz@oracle.com>
parents: 22327
diff changeset
269 def __init__(self, name, vmbuild, args, suppress=None):
c68c5babdecd Make graal gate configurable.
Roland Schatz <roland.schatz@oracle.com>
parents: 22327
diff changeset
270 self.name = name
c68c5babdecd Make graal gate configurable.
Roland Schatz <roland.schatz@oracle.com>
parents: 22327
diff changeset
271 self.vmbuild = vmbuild
c68c5babdecd Make graal gate configurable.
Roland Schatz <roland.schatz@oracle.com>
parents: 22327
diff changeset
272 self.args = args
c68c5babdecd Make graal gate configurable.
Roland Schatz <roland.schatz@oracle.com>
parents: 22327
diff changeset
273 self.suppress = suppress
c68c5babdecd Make graal gate configurable.
Roland Schatz <roland.schatz@oracle.com>
parents: 22327
diff changeset
274
22792
087d6b3e4c9b mx gate: add support for --extra-vm-argument.
Josef Eisl <josef.eisl@jku.at>
parents: 22786
diff changeset
275 def run(self, tasks, extraVMarguments=None):
22329
c68c5babdecd Make graal gate configurable.
Roland Schatz <roland.schatz@oracle.com>
parents: 22327
diff changeset
276 with VM('jvmci', self.vmbuild):
c68c5babdecd Make graal gate configurable.
Roland Schatz <roland.schatz@oracle.com>
parents: 22327
diff changeset
277 with Task(self.name + ':' + self.vmbuild, tasks) as t:
c68c5babdecd Make graal gate configurable.
Roland Schatz <roland.schatz@oracle.com>
parents: 22327
diff changeset
278 if t:
c68c5babdecd Make graal gate configurable.
Roland Schatz <roland.schatz@oracle.com>
parents: 22327
diff changeset
279 if self.suppress:
c68c5babdecd Make graal gate configurable.
Roland Schatz <roland.schatz@oracle.com>
parents: 22327
diff changeset
280 out = mx.DuplicateSuppressingStream(self.suppress).write
c68c5babdecd Make graal gate configurable.
Roland Schatz <roland.schatz@oracle.com>
parents: 22327
diff changeset
281 else:
c68c5babdecd Make graal gate configurable.
Roland Schatz <roland.schatz@oracle.com>
parents: 22327
diff changeset
282 out = None
22798
509a9eadd120 mx gate: fix --extra-vm-argument option handling for BootstrapTest.
Josef Eisl <josef.eisl@jku.at>
parents: 22797
diff changeset
283 run_vm(self.args + _noneAsEmptyList(extraVMarguments) + ['-XX:-TieredCompilation', '-XX:+BootstrapJVMCI', '-version'], out=out)
22329
c68c5babdecd Make graal gate configurable.
Roland Schatz <roland.schatz@oracle.com>
parents: 22327
diff changeset
284
22792
087d6b3e4c9b mx gate: add support for --extra-vm-argument.
Josef Eisl <josef.eisl@jku.at>
parents: 22786
diff changeset
285 def compiler_gate_runner(suites, unit_test_runs, bootstrap_tests, tasks, extraVMarguments=None):
19160
d4f80cf249d0 Run unittest earlier during gate
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 19044
diff changeset
286
21559
be896a1983c0 recast all Graal native code as JVMCI code (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21554
diff changeset
287 # Build server-hosted-jvmci now so we can run the unit tests
22326
fb528be6e4e6 Fix graal gate.
Roland Schatz <roland.schatz@oracle.com>
parents: 22324
diff changeset
288 with Task('BuildHotSpotGraalHosted: product', tasks) as t:
fb528be6e4e6 Fix graal gate.
Roland Schatz <roland.schatz@oracle.com>
parents: 22324
diff changeset
289 if t: buildvms(['--vms', 'server', '--builds', 'product'])
11756
78e6109ee411 mx refactoring for split-repo suites; should have no effect on existing repos
Mick Jordan <mick.jordan@oracle.com>
parents: 11605
diff changeset
290
21559
be896a1983c0 recast all Graal native code as JVMCI code (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21554
diff changeset
291 # Run unit tests on server-hosted-jvmci
19162
32c7a5a88523 Run unit tests even earlier during gate
Doug Simon <doug.simon@oracle.com>
parents: 19160
diff changeset
292 with VM('server', 'product'):
22329
c68c5babdecd Make graal gate configurable.
Roland Schatz <roland.schatz@oracle.com>
parents: 22327
diff changeset
293 for r in unit_test_runs:
22792
087d6b3e4c9b mx gate: add support for --extra-vm-argument.
Josef Eisl <josef.eisl@jku.at>
parents: 22786
diff changeset
294 r.run(suites, tasks, extraVMarguments)
19160
d4f80cf249d0 Run unittest earlier during gate
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 19044
diff changeset
295
21559
be896a1983c0 recast all Graal native code as JVMCI code (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21554
diff changeset
296 # Run ctw against rt.jar on server-hosted-jvmci
20032
4d119424b4ce Add CTW of rt.jar to gate
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 20020
diff changeset
297 with VM('server', 'product'):
4d119424b4ce Add CTW of rt.jar to gate
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 20020
diff changeset
298 with Task('CTW:hosted-product', tasks) as t:
22792
087d6b3e4c9b mx gate: add support for --extra-vm-argument.
Josef Eisl <josef.eisl@jku.at>
parents: 22786
diff changeset
299 if t: ctw(['--ctwopts', '-Inline +ExitVMOnException', '-esa', '-G:+CompileTheWorldMultiThreaded', '-G:-InlineDuringParsing', '-G:-CompileTheWorldVerbose', '-XX:ReservedCodeCacheSize=300m'], _noneAsEmptyList(extraVMarguments))
20032
4d119424b4ce Add CTW of rt.jar to gate
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 20020
diff changeset
300
22326
fb528be6e4e6 Fix graal gate.
Roland Schatz <roland.schatz@oracle.com>
parents: 22324
diff changeset
301 # Build the jvmci VMs so we can run the other tests
20000
e8a0a61526b2 added support for refining the tasks run by 'mx gate' (e.g., 'mx gate -t Economy' will only run tasks whose title contains the substring 'Economy')
Doug Simon <doug.simon@oracle.com>
parents: 19796
diff changeset
302 with Task('BuildHotSpotGraalOthers: fastdebug,product', tasks) as t:
22326
fb528be6e4e6 Fix graal gate.
Roland Schatz <roland.schatz@oracle.com>
parents: 22324
diff changeset
303 if t: buildvms(['--vms', 'jvmci', '--builds', 'fastdebug,product'])
11756
78e6109ee411 mx refactoring for split-repo suites; should have no effect on existing repos
Mick Jordan <mick.jordan@oracle.com>
parents: 11605
diff changeset
304
22326
fb528be6e4e6 Fix graal gate.
Roland Schatz <roland.schatz@oracle.com>
parents: 22324
diff changeset
305 # bootstrap tests
22329
c68c5babdecd Make graal gate configurable.
Roland Schatz <roland.schatz@oracle.com>
parents: 22327
diff changeset
306 for b in bootstrap_tests:
22792
087d6b3e4c9b mx gate: add support for --extra-vm-argument.
Josef Eisl <josef.eisl@jku.at>
parents: 22786
diff changeset
307 b.run(tasks, extraVMarguments)
11756
78e6109ee411 mx refactoring for split-repo suites; should have no effect on existing repos
Mick Jordan <mick.jordan@oracle.com>
parents: 11605
diff changeset
308
22326
fb528be6e4e6 Fix graal gate.
Roland Schatz <roland.schatz@oracle.com>
parents: 22324
diff changeset
309 # run dacapo sanitychecks
11756
78e6109ee411 mx refactoring for split-repo suites; should have no effect on existing repos
Mick Jordan <mick.jordan@oracle.com>
parents: 11605
diff changeset
310 for vmbuild in ['fastdebug', 'product']:
22792
087d6b3e4c9b mx gate: add support for --extra-vm-argument.
Josef Eisl <josef.eisl@jku.at>
parents: 22786
diff changeset
311 for test in sanitycheck.getDacapos(level=sanitycheck.SanityCheckLevel.Gate, gateBuildLevel=vmbuild, extraVmArguments=extraVMarguments) \
087d6b3e4c9b mx gate: add support for --extra-vm-argument.
Josef Eisl <josef.eisl@jku.at>
parents: 22786
diff changeset
312 + sanitycheck.getScalaDacapos(level=sanitycheck.SanityCheckLevel.Gate, gateBuildLevel=vmbuild, extraVmArguments=extraVMarguments):
17438
b8d89559915d mx: implement with support for Task()
Bernhard Urban <bernhard.urban@jku.at>
parents: 17437
diff changeset
313 with Task(str(test) + ':' + vmbuild, tasks) as t:
21559
be896a1983c0 recast all Graal native code as JVMCI code (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21554
diff changeset
314 if t and not test.test('jvmci'):
17438
b8d89559915d mx: implement with support for Task()
Bernhard Urban <bernhard.urban@jku.at>
parents: 17437
diff changeset
315 t.abort(test.name + ' Failed')
11756
78e6109ee411 mx refactoring for split-repo suites; should have no effect on existing repos
Mick Jordan <mick.jordan@oracle.com>
parents: 11605
diff changeset
316
16381
d91fecb90fc0 Check -Xbatch still works in the gate
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 16327
diff changeset
317 # ensure -Xbatch still works
21559
be896a1983c0 recast all Graal native code as JVMCI code (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21554
diff changeset
318 with VM('jvmci', 'product'):
20000
e8a0a61526b2 added support for refining the tasks run by 'mx gate' (e.g., 'mx gate -t Economy' will only run tasks whose title contains the substring 'Economy')
Doug Simon <doug.simon@oracle.com>
parents: 19796
diff changeset
319 with Task('DaCapo_pmd:BatchMode:product', tasks) as t:
22792
087d6b3e4c9b mx gate: add support for --extra-vm-argument.
Josef Eisl <josef.eisl@jku.at>
parents: 22786
diff changeset
320 if t: dacapo(_noneAsEmptyList(extraVMarguments) + ['-Xbatch', 'pmd'])
16381
d91fecb90fc0 Check -Xbatch still works in the gate
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 16327
diff changeset
321
16437
680f52926754 added test for -Xcomp to the gate
Doug Simon <doug.simon@oracle.com>
parents: 16419
diff changeset
322 # ensure -Xcomp still works
21559
be896a1983c0 recast all Graal native code as JVMCI code (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21554
diff changeset
323 with VM('jvmci', 'product'):
20000
e8a0a61526b2 added support for refining the tasks run by 'mx gate' (e.g., 'mx gate -t Economy' will only run tasks whose title contains the substring 'Economy')
Doug Simon <doug.simon@oracle.com>
parents: 19796
diff changeset
324 with Task('XCompMode:product', tasks) as t:
22792
087d6b3e4c9b mx gate: add support for --extra-vm-argument.
Josef Eisl <josef.eisl@jku.at>
parents: 22786
diff changeset
325 if t: run_vm(_noneAsEmptyList(extraVMarguments) + ['-Xcomp', '-version'])
16437
680f52926754 added test for -Xcomp to the gate
Doug Simon <doug.simon@oracle.com>
parents: 16419
diff changeset
326
4159
e253ca26b2d5 Added 'unittest' command to run the Graal unit tests.
Doug Simon <doug.simon@oracle.com>
parents: 4157
diff changeset
327
22329
c68c5babdecd Make graal gate configurable.
Roland Schatz <roland.schatz@oracle.com>
parents: 22327
diff changeset
328 graal_unit_test_runs = [
c68c5babdecd Make graal gate configurable.
Roland Schatz <roland.schatz@oracle.com>
parents: 22327
diff changeset
329 UnitTestRun('UnitTests', []),
c68c5babdecd Make graal gate configurable.
Roland Schatz <roland.schatz@oracle.com>
parents: 22327
diff changeset
330 ]
4601
ade18666f2be Added --omit-native-build to gate command so that native cleaning and building can be omitted for changesets that made no changes to the C/C++ code.
Doug Simon <doug.simon@oracle.com>
parents: 4584
diff changeset
331
22770
42b173295a32 Use mx.get_arch instead of platform.processor
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 22764
diff changeset
332 _registers = 'o0,o1,o2,o3,f8,f9,d32,d34' if mx.get_arch() == 'sparcv9' else 'rbx,r11,r10,r14,xmm3,xmm11,xmm14'
11526
db297343d44e added pylint to gate
Doug Simon <doug.simon@oracle.com>
parents: 11525
diff changeset
333
22329
c68c5babdecd Make graal gate configurable.
Roland Schatz <roland.schatz@oracle.com>
parents: 22327
diff changeset
334 graal_bootstrap_tests = [
c68c5babdecd Make graal gate configurable.
Roland Schatz <roland.schatz@oracle.com>
parents: 22327
diff changeset
335 BootstrapTest('BootstrapWithSystemAssertions', 'fastdebug', ['-esa']),
c68c5babdecd Make graal gate configurable.
Roland Schatz <roland.schatz@oracle.com>
parents: 22327
diff changeset
336 BootstrapTest('BootstrapWithSystemAssertionsNoCoop', 'fastdebug', ['-esa', '-XX:-UseCompressedOops']),
c68c5babdecd Make graal gate configurable.
Roland Schatz <roland.schatz@oracle.com>
parents: 22327
diff changeset
337 BootstrapTest('BootstrapWithGCVecification', 'product', ['-XX:+UnlockDiagnosticVMOptions', '-XX:+VerifyBeforeGC', '-XX:+VerifyAfterGC'], suppress=['VerifyAfterGC:', 'VerifyBeforeGC:']),
c68c5babdecd Make graal gate configurable.
Roland Schatz <roland.schatz@oracle.com>
parents: 22327
diff changeset
338 BootstrapTest('BootstrapWithG1GCVecification', 'product', ['-XX:+UnlockDiagnosticVMOptions', '-XX:-UseSerialGC', '-XX:+UseG1GC', '-XX:+VerifyBeforeGC', '-XX:+VerifyAfterGC'], suppress=['VerifyAfterGC:', 'VerifyBeforeGC:']),
22471
0a082a17d2a7 Use jvmci.compiler property for compiler selection.
Roland Schatz <roland.schatz@oracle.com>
parents: 22420
diff changeset
339 BootstrapTest('BootstrapEconomyWithSystemAssertions', 'fastdebug', ['-esa', '-Djvmci.compiler=graal-economy']),
22329
c68c5babdecd Make graal gate configurable.
Roland Schatz <roland.schatz@oracle.com>
parents: 22327
diff changeset
340 BootstrapTest('BootstrapWithExceptionEdges', 'fastdebug', ['-esa', '-G:+StressInvokeWithExceptionNode']),
c68c5babdecd Make graal gate configurable.
Roland Schatz <roland.schatz@oracle.com>
parents: 22327
diff changeset
341 BootstrapTest('BootstrapWithRegisterPressure', 'product', ['-esa', '-G:RegisterPressure=' + _registers]),
22390
Roland Schatz <roland.schatz@oracle.com>
parents: 22330 22377
diff changeset
342 BootstrapTest('BootstrapTraceRAWithRegisterPressure', 'product', ['-esa', '-G:+TraceRA', '-G:RegisterPressure=' + _registers]),
22329
c68c5babdecd Make graal gate configurable.
Roland Schatz <roland.schatz@oracle.com>
parents: 22327
diff changeset
343 BootstrapTest('BootstrapWithImmutableCode', 'product', ['-esa', '-G:+ImmutableCode', '-G:+VerifyPhases']),
c68c5babdecd Make graal gate configurable.
Roland Schatz <roland.schatz@oracle.com>
parents: 22327
diff changeset
344 ]
9172
bc5c5336008b Add gate test to check build-graal.xml is up to date.
Roland Schatz <roland.schatz@oracle.com>
parents: 9169
diff changeset
345
22329
c68c5babdecd Make graal gate configurable.
Roland Schatz <roland.schatz@oracle.com>
parents: 22327
diff changeset
346 def _graal_gate_runner(args, tasks):
22792
087d6b3e4c9b mx gate: add support for --extra-vm-argument.
Josef Eisl <josef.eisl@jku.at>
parents: 22786
diff changeset
347 compiler_gate_runner(['graal'], graal_unit_test_runs, graal_bootstrap_tests, tasks, args.extra_vm_argument)
11757
ec058ce90a3d pylint fixes
Mick Jordan <mick.jordan@oracle.com>
parents: 11756
diff changeset
348
22293
782394d3d465 updated imported suite version
Doug Simon <doug.simon@oracle.com>
parents: 22291
diff changeset
349 mx_gate.add_gate_runner(_suite, _graal_gate_runner)
22792
087d6b3e4c9b mx gate: add support for --extra-vm-argument.
Josef Eisl <josef.eisl@jku.at>
parents: 22786
diff changeset
350 mx_gate.add_gate_argument('--extra-vm-argument', action='append', help='add extra vm argument to gate tasks if applicable (multiple occurrences allowed)')
20000
e8a0a61526b2 added support for refining the tasks run by 'mx gate' (e.g., 'mx gate -t Economy' will only run tasks whose title contains the substring 'Economy')
Doug Simon <doug.simon@oracle.com>
parents: 19796
diff changeset
351
6340
74560fdffd51 Add a draft longtests command to mc's commands
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 6319
diff changeset
352 def deoptalot(args):
22108
51ceda0cf404 mx: make deoptalot command more flexible in terms of VM management
Doug Simon <doug.simon@oracle.com>
parents: 22099
diff changeset
353 """bootstrap a VM with DeoptimizeALot and VerifyOops on
6340
74560fdffd51 Add a draft longtests command to mc's commands
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 6319
diff changeset
354
74560fdffd51 Add a draft longtests command to mc's commands
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 6319
diff changeset
355 If the first argument is a number, the process will be repeated
74560fdffd51 Add a draft longtests command to mc's commands
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 6319
diff changeset
356 this number of times. All other arguments are passed to the VM."""
74560fdffd51 Add a draft longtests command to mc's commands
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 6319
diff changeset
357 count = 1
74560fdffd51 Add a draft longtests command to mc's commands
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 6319
diff changeset
358 if len(args) > 0 and args[0].isdigit():
74560fdffd51 Add a draft longtests command to mc's commands
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 6319
diff changeset
359 count = int(args[0])
74560fdffd51 Add a draft longtests command to mc's commands
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 6319
diff changeset
360 del args[0]
11514
dc3c8df55905 added support for pylint and fixed errors/warnings it found
Doug Simon <doug.simon@oracle.com>
parents: 11512
diff changeset
361
7509
442668d41bc2 fixed warnings
Doug Simon <doug.simon@oracle.com>
parents: 7345
diff changeset
362 for _ in range(count):
22542
c35e3fccb8da adapted to jvmci changes
Doug Simon <doug.simon@oracle.com>
parents: 22525
diff changeset
363 if not run_vm(['-XX:-TieredCompilation', '-XX:+DeoptimizeALot', '-XX:+VerifyOops'] + args + ['-version']) == 0:
6340
74560fdffd51 Add a draft longtests command to mc's commands
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 6319
diff changeset
364 mx.abort("Failed")
11514
dc3c8df55905 added support for pylint and fixed errors/warnings it found
Doug Simon <doug.simon@oracle.com>
parents: 11512
diff changeset
365
6340
74560fdffd51 Add a draft longtests command to mc's commands
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 6319
diff changeset
366 def longtests(args):
11514
dc3c8df55905 added support for pylint and fixed errors/warnings it found
Doug Simon <doug.simon@oracle.com>
parents: 11512
diff changeset
367
6340
74560fdffd51 Add a draft longtests command to mc's commands
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 6319
diff changeset
368 deoptalot(['15', '-Xmx48m'])
11514
dc3c8df55905 added support for pylint and fixed errors/warnings it found
Doug Simon <doug.simon@oracle.com>
parents: 11512
diff changeset
369
6340
74560fdffd51 Add a draft longtests command to mc's commands
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 6319
diff changeset
370 dacapo(['100', 'eclipse', '-esa'])
4215
a2caa019ba3a Fix mx : commands' scripts mx_init hook should be called before parsing command line arguments.
Gilles Duboscq <gilles.m.duboscq@gmail.com>
parents: 4187
diff changeset
371
22145
d5a51a47eb1b mx: make bench command extensible
Doug Simon <doug.simon@oracle.com>
parents: 22139
diff changeset
372 """
d5a51a47eb1b mx: make bench command extensible
Doug Simon <doug.simon@oracle.com>
parents: 22139
diff changeset
373 Extra benchmarks to run from 'bench()'.
d5a51a47eb1b mx: make bench command extensible
Doug Simon <doug.simon@oracle.com>
parents: 22139
diff changeset
374 """
d5a51a47eb1b mx: make bench command extensible
Doug Simon <doug.simon@oracle.com>
parents: 22139
diff changeset
375 extraBenchmarks = []
5089
206e68bb66c6 Made the IdealGraphVisualizer runnable from mx with new 'igv' command.
Doug Simon <doug.simon@oracle.com>
parents: 5064
diff changeset
376
4215
a2caa019ba3a Fix mx : commands' scripts mx_init hook should be called before parsing command line arguments.
Gilles Duboscq <gilles.m.duboscq@gmail.com>
parents: 4187
diff changeset
377 def bench(args):
4324
b0aa4a52b89c Added support for project specs in classpath.
Doug Simon <doug.simon@oracle.com>
parents: 4294
diff changeset
378 """run benchmarks and parse their output for results
4282
063ea022532c mx commands : improve bench command, fix in the outparser so that no empty 'line' is retruned if there was no match, fix bootstrap's regex
Gilles Duboscq <gilles.m.duboscq@gmail.com>
parents: 4276
diff changeset
379
063ea022532c mx commands : improve bench command, fix in the outparser so that no empty 'line' is retruned if there was no match, fix bootstrap's regex
Gilles Duboscq <gilles.m.duboscq@gmail.com>
parents: 4276
diff changeset
380 Results are JSON formated : {group : {benchmark : score}}."""
063ea022532c mx commands : improve bench command, fix in the outparser so that no empty 'line' is retruned if there was no match, fix bootstrap's regex
Gilles Duboscq <gilles.m.duboscq@gmail.com>
parents: 4276
diff changeset
381 resultFile = None
063ea022532c mx commands : improve bench command, fix in the outparser so that no empty 'line' is retruned if there was no match, fix bootstrap's regex
Gilles Duboscq <gilles.m.duboscq@gmail.com>
parents: 4276
diff changeset
382 if '-resultfile' in args:
063ea022532c mx commands : improve bench command, fix in the outparser so that no empty 'line' is retruned if there was no match, fix bootstrap's regex
Gilles Duboscq <gilles.m.duboscq@gmail.com>
parents: 4276
diff changeset
383 index = args.index('-resultfile')
063ea022532c mx commands : improve bench command, fix in the outparser so that no empty 'line' is retruned if there was no match, fix bootstrap's regex
Gilles Duboscq <gilles.m.duboscq@gmail.com>
parents: 4276
diff changeset
384 if index + 1 < len(args):
063ea022532c mx commands : improve bench command, fix in the outparser so that no empty 'line' is retruned if there was no match, fix bootstrap's regex
Gilles Duboscq <gilles.m.duboscq@gmail.com>
parents: 4276
diff changeset
385 resultFile = args[index + 1]
4293
d4906ea4255b Handle SIGTERM : killing mx will properly kill subprocesses
Gilles Duboscq <gilles.m.duboscq@gmail.com>
parents: 4288
diff changeset
386 del args[index]
d4906ea4255b Handle SIGTERM : killing mx will properly kill subprocesses
Gilles Duboscq <gilles.m.duboscq@gmail.com>
parents: 4288
diff changeset
387 del args[index]
4282
063ea022532c mx commands : improve bench command, fix in the outparser so that no empty 'line' is retruned if there was no match, fix bootstrap's regex
Gilles Duboscq <gilles.m.duboscq@gmail.com>
parents: 4276
diff changeset
388 else:
063ea022532c mx commands : improve bench command, fix in the outparser so that no empty 'line' is retruned if there was no match, fix bootstrap's regex
Gilles Duboscq <gilles.m.duboscq@gmail.com>
parents: 4276
diff changeset
389 mx.abort('-resultfile must be followed by a file name')
22145
d5a51a47eb1b mx: make bench command extensible
Doug Simon <doug.simon@oracle.com>
parents: 22139
diff changeset
390 resultFileCSV = None
d5a51a47eb1b mx: make bench command extensible
Doug Simon <doug.simon@oracle.com>
parents: 22139
diff changeset
391 if '-resultfilecsv' in args:
d5a51a47eb1b mx: make bench command extensible
Doug Simon <doug.simon@oracle.com>
parents: 22139
diff changeset
392 index = args.index('-resultfilecsv')
d5a51a47eb1b mx: make bench command extensible
Doug Simon <doug.simon@oracle.com>
parents: 22139
diff changeset
393 if index + 1 < len(args):
d5a51a47eb1b mx: make bench command extensible
Doug Simon <doug.simon@oracle.com>
parents: 22139
diff changeset
394 resultFileCSV = args[index + 1]
d5a51a47eb1b mx: make bench command extensible
Doug Simon <doug.simon@oracle.com>
parents: 22139
diff changeset
395 del args[index]
d5a51a47eb1b mx: make bench command extensible
Doug Simon <doug.simon@oracle.com>
parents: 22139
diff changeset
396 del args[index]
d5a51a47eb1b mx: make bench command extensible
Doug Simon <doug.simon@oracle.com>
parents: 22139
diff changeset
397 else:
d5a51a47eb1b mx: make bench command extensible
Doug Simon <doug.simon@oracle.com>
parents: 22139
diff changeset
398 mx.abort('-resultfilecsv must be followed by a file name')
22139
258eaaa98484 Initial split off from monolithic basic-graal repo
Doug Simon <doug.simon@oracle.com>
parents: 22108
diff changeset
399 vm = get_vm()
4282
063ea022532c mx commands : improve bench command, fix in the outparser so that no empty 'line' is retruned if there was no match, fix bootstrap's regex
Gilles Duboscq <gilles.m.duboscq@gmail.com>
parents: 4276
diff changeset
400 if len(args) is 0:
7563
3aab15f42934 moved execution of a benchmark out of OutputParser
Doug Simon <doug.simon@oracle.com>
parents: 7552
diff changeset
401 args = ['all']
11514
dc3c8df55905 added support for pylint and fixed errors/warnings it found
Doug Simon <doug.simon@oracle.com>
parents: 11512
diff changeset
402
8459
3393f870e6a4 Allow vm arguments in mx bench
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 8440
diff changeset
403 vmArgs = [arg for arg in args if arg.startswith('-')]
7563
3aab15f42934 moved execution of a benchmark out of OutputParser
Doug Simon <doug.simon@oracle.com>
parents: 7552
diff changeset
404
3aab15f42934 moved execution of a benchmark out of OutputParser
Doug Simon <doug.simon@oracle.com>
parents: 7552
diff changeset
405 def benchmarks_in_group(group):
3aab15f42934 moved execution of a benchmark out of OutputParser
Doug Simon <doug.simon@oracle.com>
parents: 7552
diff changeset
406 prefix = group + ':'
3aab15f42934 moved execution of a benchmark out of OutputParser
Doug Simon <doug.simon@oracle.com>
parents: 7552
diff changeset
407 return [a[len(prefix):] for a in args if a.startswith(prefix)]
4282
063ea022532c mx commands : improve bench command, fix in the outparser so that no empty 'line' is retruned if there was no match, fix bootstrap's regex
Gilles Duboscq <gilles.m.duboscq@gmail.com>
parents: 4276
diff changeset
408
4219
47f7d91d34cf Fix javac build issues with classpath
Gilles Duboscq <gilles.m.duboscq@gmail.com>
parents: 4216
diff changeset
409 results = {}
4282
063ea022532c mx commands : improve bench command, fix in the outparser so that no empty 'line' is retruned if there was no match, fix bootstrap's regex
Gilles Duboscq <gilles.m.duboscq@gmail.com>
parents: 4276
diff changeset
410 benchmarks = []
11514
dc3c8df55905 added support for pylint and fixed errors/warnings it found
Doug Simon <doug.simon@oracle.com>
parents: 11512
diff changeset
411 # DaCapo
13967
4cd7c6629841 mx_graal: fix pylint 1.1.0 warnings
Bernhard Urban <bernhard.urban@jku.at>
parents: 13952
diff changeset
412 if 'dacapo' in args or 'all' in args:
4282
063ea022532c mx commands : improve bench command, fix in the outparser so that no empty 'line' is retruned if there was no match, fix bootstrap's regex
Gilles Duboscq <gilles.m.duboscq@gmail.com>
parents: 4276
diff changeset
413 benchmarks += sanitycheck.getDacapos(level=sanitycheck.SanityCheckLevel.Benchmark)
4335
0d661161fa24 Add possibility to run individual DaCapo & SPECjvm2008 benchmarks, small fix in success and score regular expressions for SPECjvm2008
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 4330
diff changeset
414 else:
7563
3aab15f42934 moved execution of a benchmark out of OutputParser
Doug Simon <doug.simon@oracle.com>
parents: 7552
diff changeset
415 dacapos = benchmarks_in_group('dacapo')
4335
0d661161fa24 Add possibility to run individual DaCapo & SPECjvm2008 benchmarks, small fix in success and score regular expressions for SPECjvm2008
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 4330
diff changeset
416 for dacapo in dacapos:
0d661161fa24 Add possibility to run individual DaCapo & SPECjvm2008 benchmarks, small fix in success and score regular expressions for SPECjvm2008
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 4330
diff changeset
417 if dacapo not in sanitycheck.dacapoSanityWarmup.keys():
7563
3aab15f42934 moved execution of a benchmark out of OutputParser
Doug Simon <doug.simon@oracle.com>
parents: 7552
diff changeset
418 mx.abort('Unknown DaCapo : ' + dacapo)
8891
ca82d06ec93a mx: bench command should not run dacapos with -n 0 when using a specification such as scaladacapo:specs
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 8890
diff changeset
419 iterations = sanitycheck.dacapoSanityWarmup[dacapo][sanitycheck.SanityCheckLevel.Benchmark]
13967
4cd7c6629841 mx_graal: fix pylint 1.1.0 warnings
Bernhard Urban <bernhard.urban@jku.at>
parents: 13952
diff changeset
420 if iterations > 0:
22194
b8c1c277a6ef Propagate -n parameter properly to dacapo for calls such as 'mx bench dacapo:*'
Stefan Anzinger <stefan.anzinger@oracle.com>
parents: 22152
diff changeset
421 benchmarks += [sanitycheck.getDacapo(dacapo, ['-n', str(iterations)])]
5729
dab877fe7c31 prevented error during mx site from corrupting an existing site
Doug Simon <doug.simon@oracle.com>
parents: 5708
diff changeset
422
13967
4cd7c6629841 mx_graal: fix pylint 1.1.0 warnings
Bernhard Urban <bernhard.urban@jku.at>
parents: 13952
diff changeset
423 if 'scaladacapo' in args or 'all' in args:
4480
7d6490436b57 Add Scala DaCapo benchs
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 4438
diff changeset
424 benchmarks += sanitycheck.getScalaDacapos(level=sanitycheck.SanityCheckLevel.Benchmark)
7d6490436b57 Add Scala DaCapo benchs
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 4438
diff changeset
425 else:
7563
3aab15f42934 moved execution of a benchmark out of OutputParser
Doug Simon <doug.simon@oracle.com>
parents: 7552
diff changeset
426 scaladacapos = benchmarks_in_group('scaladacapo')
3aab15f42934 moved execution of a benchmark out of OutputParser
Doug Simon <doug.simon@oracle.com>
parents: 7552
diff changeset
427 for scaladacapo in scaladacapos:
3aab15f42934 moved execution of a benchmark out of OutputParser
Doug Simon <doug.simon@oracle.com>
parents: 7552
diff changeset
428 if scaladacapo not in sanitycheck.dacapoScalaSanityWarmup.keys():
3aab15f42934 moved execution of a benchmark out of OutputParser
Doug Simon <doug.simon@oracle.com>
parents: 7552
diff changeset
429 mx.abort('Unknown Scala DaCapo : ' + scaladacapo)
8891
ca82d06ec93a mx: bench command should not run dacapos with -n 0 when using a specification such as scaladacapo:specs
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 8890
diff changeset
430 iterations = sanitycheck.dacapoScalaSanityWarmup[scaladacapo][sanitycheck.SanityCheckLevel.Benchmark]
13967
4cd7c6629841 mx_graal: fix pylint 1.1.0 warnings
Bernhard Urban <bernhard.urban@jku.at>
parents: 13952
diff changeset
431 if iterations > 0:
11367
39b86b83ddeb normalized the command line interface for the dacapo, scaladacapo, specjvm2008, specjbb2005 and specjbb2013 commands
Doug Simon <doug.simon@oracle.com>
parents: 11359
diff changeset
432 benchmarks += [sanitycheck.getScalaDacapo(scaladacapo, ['-n', str(iterations)])]
5729
dab877fe7c31 prevented error during mx site from corrupting an existing site
Doug Simon <doug.simon@oracle.com>
parents: 5708
diff changeset
433
11514
dc3c8df55905 added support for pylint and fixed errors/warnings it found
Doug Simon <doug.simon@oracle.com>
parents: 11512
diff changeset
434 # Bootstrap
13967
4cd7c6629841 mx_graal: fix pylint 1.1.0 warnings
Bernhard Urban <bernhard.urban@jku.at>
parents: 13952
diff changeset
435 if 'bootstrap' in args or 'all' in args:
4282
063ea022532c mx commands : improve bench command, fix in the outparser so that no empty 'line' is retruned if there was no match, fix bootstrap's regex
Gilles Duboscq <gilles.m.duboscq@gmail.com>
parents: 4276
diff changeset
436 benchmarks += sanitycheck.getBootstraps()
11514
dc3c8df55905 added support for pylint and fixed errors/warnings it found
Doug Simon <doug.simon@oracle.com>
parents: 11512
diff changeset
437 # SPECjvm2008
13967
4cd7c6629841 mx_graal: fix pylint 1.1.0 warnings
Bernhard Urban <bernhard.urban@jku.at>
parents: 13952
diff changeset
438 if 'specjvm2008' in args or 'all' in args:
11373
6675167d52b6 fixed specjvm2008 regression in bench command
Doug Simon <doug.simon@oracle.com>
parents: 11372
diff changeset
439 benchmarks += [sanitycheck.getSPECjvm2008(['-ikv', '-wt', '120', '-it', '120'])]
4335
0d661161fa24 Add possibility to run individual DaCapo & SPECjvm2008 benchmarks, small fix in success and score regular expressions for SPECjvm2008
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 4330
diff changeset
440 else:
7563
3aab15f42934 moved execution of a benchmark out of OutputParser
Doug Simon <doug.simon@oracle.com>
parents: 7552
diff changeset
441 specjvms = benchmarks_in_group('specjvm2008')
4335
0d661161fa24 Add possibility to run individual DaCapo & SPECjvm2008 benchmarks, small fix in success and score regular expressions for SPECjvm2008
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 4330
diff changeset
442 for specjvm in specjvms:
11373
6675167d52b6 fixed specjvm2008 regression in bench command
Doug Simon <doug.simon@oracle.com>
parents: 11372
diff changeset
443 benchmarks += [sanitycheck.getSPECjvm2008(['-ikv', '-wt', '120', '-it', '120', specjvm])]
11514
dc3c8df55905 added support for pylint and fixed errors/warnings it found
Doug Simon <doug.simon@oracle.com>
parents: 11512
diff changeset
444
13967
4cd7c6629841 mx_graal: fix pylint 1.1.0 warnings
Bernhard Urban <bernhard.urban@jku.at>
parents: 13952
diff changeset
445 if 'specjbb2005' in args or 'all' in args:
5877
0e54d9bb922d Add SPECjbb2005 to the benchmarks
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 5875
diff changeset
446 benchmarks += [sanitycheck.getSPECjbb2005()]
11514
dc3c8df55905 added support for pylint and fixed errors/warnings it found
Doug Simon <doug.simon@oracle.com>
parents: 11512
diff changeset
447
13967
4cd7c6629841 mx_graal: fix pylint 1.1.0 warnings
Bernhard Urban <bernhard.urban@jku.at>
parents: 13952
diff changeset
448 if 'specjbb2013' in args: # or 'all' in args //currently not in default set
7565
9a521597686b Add SPECjbb2013
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 7563
diff changeset
449 benchmarks += [sanitycheck.getSPECjbb2013()]
11514
dc3c8df55905 added support for pylint and fixed errors/warnings it found
Doug Simon <doug.simon@oracle.com>
parents: 11512
diff changeset
450
13967
4cd7c6629841 mx_graal: fix pylint 1.1.0 warnings
Bernhard Urban <bernhard.urban@jku.at>
parents: 13952
diff changeset
451 if 'ctw-full' in args:
9157
a38d748d4130 Add support for the 'optimized' build in mx
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 9130
diff changeset
452 benchmarks.append(sanitycheck.getCTW(vm, sanitycheck.CTWMode.Full))
13967
4cd7c6629841 mx_graal: fix pylint 1.1.0 warnings
Bernhard Urban <bernhard.urban@jku.at>
parents: 13952
diff changeset
453 if 'ctw-noinline' in args:
9157
a38d748d4130 Add support for the 'optimized' build in mx
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 9130
diff changeset
454 benchmarks.append(sanitycheck.getCTW(vm, sanitycheck.CTWMode.NoInline))
5729
dab877fe7c31 prevented error during mx site from corrupting an existing site
Doug Simon <doug.simon@oracle.com>
parents: 5708
diff changeset
455
22145
d5a51a47eb1b mx: make bench command extensible
Doug Simon <doug.simon@oracle.com>
parents: 22139
diff changeset
456 for f in extraBenchmarks:
d5a51a47eb1b mx: make bench command extensible
Doug Simon <doug.simon@oracle.com>
parents: 22139
diff changeset
457 f(args, vm, benchmarks)
d5a51a47eb1b mx: make bench command extensible
Doug Simon <doug.simon@oracle.com>
parents: 22139
diff changeset
458
4219
47f7d91d34cf Fix javac build issues with classpath
Gilles Duboscq <gilles.m.duboscq@gmail.com>
parents: 4216
diff changeset
459 for test in benchmarks:
11367
39b86b83ddeb normalized the command line interface for the dacapo, scaladacapo, specjvm2008, specjbb2005 and specjbb2013 commands
Doug Simon <doug.simon@oracle.com>
parents: 11359
diff changeset
460 for (groupName, res) in test.bench(vm, extraVmOpts=vmArgs).items():
7563
3aab15f42934 moved execution of a benchmark out of OutputParser
Doug Simon <doug.simon@oracle.com>
parents: 7552
diff changeset
461 group = results.setdefault(groupName, {})
3aab15f42934 moved execution of a benchmark out of OutputParser
Doug Simon <doug.simon@oracle.com>
parents: 7552
diff changeset
462 group.update(res)
4282
063ea022532c mx commands : improve bench command, fix in the outparser so that no empty 'line' is retruned if there was no match, fix bootstrap's regex
Gilles Duboscq <gilles.m.duboscq@gmail.com>
parents: 4276
diff changeset
463 mx.log(json.dumps(results))
063ea022532c mx commands : improve bench command, fix in the outparser so that no empty 'line' is retruned if there was no match, fix bootstrap's regex
Gilles Duboscq <gilles.m.duboscq@gmail.com>
parents: 4276
diff changeset
464 if resultFile:
063ea022532c mx commands : improve bench command, fix in the outparser so that no empty 'line' is retruned if there was no match, fix bootstrap's regex
Gilles Duboscq <gilles.m.duboscq@gmail.com>
parents: 4276
diff changeset
465 with open(resultFile, 'w') as f:
063ea022532c mx commands : improve bench command, fix in the outparser so that no empty 'line' is retruned if there was no match, fix bootstrap's regex
Gilles Duboscq <gilles.m.duboscq@gmail.com>
parents: 4276
diff changeset
466 f.write(json.dumps(results))
22145
d5a51a47eb1b mx: make bench command extensible
Doug Simon <doug.simon@oracle.com>
parents: 22139
diff changeset
467 if resultFileCSV:
d5a51a47eb1b mx: make bench command extensible
Doug Simon <doug.simon@oracle.com>
parents: 22139
diff changeset
468 with open(resultFileCSV, 'w') as f:
d5a51a47eb1b mx: make bench command extensible
Doug Simon <doug.simon@oracle.com>
parents: 22139
diff changeset
469 for key1, value1 in results.iteritems():
d5a51a47eb1b mx: make bench command extensible
Doug Simon <doug.simon@oracle.com>
parents: 22139
diff changeset
470 f.write('%s;\n' % (str(key1)))
d5a51a47eb1b mx: make bench command extensible
Doug Simon <doug.simon@oracle.com>
parents: 22139
diff changeset
471 for key2, value2 in sorted(value1.iteritems()):
d5a51a47eb1b mx: make bench command extensible
Doug Simon <doug.simon@oracle.com>
parents: 22139
diff changeset
472 f.write('%s; %s;\n' % (str(key2), str(value2)))
13935
ca0e1af320f6 mx: add support for jmh benchmark suites
Bernhard Urban <bernhard.urban@jku.at>
parents: 13928
diff changeset
473
4228
e872562f95f8 add a simple specjvm2008 command, fail a benchmark if one of the failureRE matches
Gilles Duboscq <gilles.m.duboscq@gmail.com>
parents: 4227
diff changeset
474 def specjvm2008(args):
11367
39b86b83ddeb normalized the command line interface for the dacapo, scaladacapo, specjvm2008, specjbb2005 and specjbb2013 commands
Doug Simon <doug.simon@oracle.com>
parents: 11359
diff changeset
475 """run one or more SPECjvm2008 benchmarks"""
11514
dc3c8df55905 added support for pylint and fixed errors/warnings it found
Doug Simon <doug.simon@oracle.com>
parents: 11512
diff changeset
476
11367
39b86b83ddeb normalized the command line interface for the dacapo, scaladacapo, specjvm2008, specjbb2005 and specjbb2013 commands
Doug Simon <doug.simon@oracle.com>
parents: 11359
diff changeset
477 def launcher(bm, harnessArgs, extraVmOpts):
22139
258eaaa98484 Initial split off from monolithic basic-graal repo
Doug Simon <doug.simon@oracle.com>
parents: 22108
diff changeset
478 return sanitycheck.getSPECjvm2008(harnessArgs + [bm]).bench(get_vm(), extraVmOpts=extraVmOpts)
11514
dc3c8df55905 added support for pylint and fixed errors/warnings it found
Doug Simon <doug.simon@oracle.com>
parents: 11512
diff changeset
479
11372
76c45fb64191 added support to the specjvm2008 command for specifying a benchmark group
Doug Simon <doug.simon@oracle.com>
parents: 11371
diff changeset
480 availableBenchmarks = set(sanitycheck.specjvm2008Names)
22596
b3c4b69bc71f mx specjvm2008: do not add benchmark groups when running "all" benchmarks.
Josef Eisl <josef.eisl@jku.at>
parents: 22593
diff changeset
481 if "all" not in args:
b3c4b69bc71f mx specjvm2008: do not add benchmark groups when running "all" benchmarks.
Josef Eisl <josef.eisl@jku.at>
parents: 22593
diff changeset
482 # only add benchmark groups if we are not running "all"
b3c4b69bc71f mx specjvm2008: do not add benchmark groups when running "all" benchmarks.
Josef Eisl <josef.eisl@jku.at>
parents: 22593
diff changeset
483 for name in sanitycheck.specjvm2008Names:
b3c4b69bc71f mx specjvm2008: do not add benchmark groups when running "all" benchmarks.
Josef Eisl <josef.eisl@jku.at>
parents: 22593
diff changeset
484 parts = name.rsplit('.', 1)
b3c4b69bc71f mx specjvm2008: do not add benchmark groups when running "all" benchmarks.
Josef Eisl <josef.eisl@jku.at>
parents: 22593
diff changeset
485 if len(parts) > 1:
b3c4b69bc71f mx specjvm2008: do not add benchmark groups when running "all" benchmarks.
Josef Eisl <josef.eisl@jku.at>
parents: 22593
diff changeset
486 assert len(parts) == 2
b3c4b69bc71f mx specjvm2008: do not add benchmark groups when running "all" benchmarks.
Josef Eisl <josef.eisl@jku.at>
parents: 22593
diff changeset
487 group = parts[0]
b3c4b69bc71f mx specjvm2008: do not add benchmark groups when running "all" benchmarks.
Josef Eisl <josef.eisl@jku.at>
parents: 22593
diff changeset
488 availableBenchmarks.add(group)
11372
76c45fb64191 added support to the specjvm2008 command for specifying a benchmark group
Doug Simon <doug.simon@oracle.com>
parents: 11371
diff changeset
489
76c45fb64191 added support to the specjvm2008 command for specifying a benchmark group
Doug Simon <doug.simon@oracle.com>
parents: 11371
diff changeset
490 _run_benchmark(args, sorted(availableBenchmarks), launcher)
11514
dc3c8df55905 added support for pylint and fixed errors/warnings it found
Doug Simon <doug.simon@oracle.com>
parents: 11512
diff changeset
491
8147
9786ac8fff61 Use different vm args for SPECjbb2013
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 8135
diff changeset
492 def specjbb2013(args):
16782
9f5e33cf8d52 Factored out the '_copyToJdk' function and allow copying files to jre/lib/ext.
Danilo Ansaloni <danilo.ansaloni@oracle.com>
parents: 16729
diff changeset
493 """run the composite SPECjbb2013 benchmark"""
11514
dc3c8df55905 added support for pylint and fixed errors/warnings it found
Doug Simon <doug.simon@oracle.com>
parents: 11512
diff changeset
494
11367
39b86b83ddeb normalized the command line interface for the dacapo, scaladacapo, specjvm2008, specjbb2005 and specjbb2013 commands
Doug Simon <doug.simon@oracle.com>
parents: 11359
diff changeset
495 def launcher(bm, harnessArgs, extraVmOpts):
39b86b83ddeb normalized the command line interface for the dacapo, scaladacapo, specjvm2008, specjbb2005 and specjbb2013 commands
Doug Simon <doug.simon@oracle.com>
parents: 11359
diff changeset
496 assert bm is None
22139
258eaaa98484 Initial split off from monolithic basic-graal repo
Doug Simon <doug.simon@oracle.com>
parents: 22108
diff changeset
497 return sanitycheck.getSPECjbb2013(harnessArgs).bench(get_vm(), extraVmOpts=extraVmOpts)
11514
dc3c8df55905 added support for pylint and fixed errors/warnings it found
Doug Simon <doug.simon@oracle.com>
parents: 11512
diff changeset
498
11367
39b86b83ddeb normalized the command line interface for the dacapo, scaladacapo, specjvm2008, specjbb2005 and specjbb2013 commands
Doug Simon <doug.simon@oracle.com>
parents: 11359
diff changeset
499 _run_benchmark(args, None, launcher)
5729
dab877fe7c31 prevented error during mx site from corrupting an existing site
Doug Simon <doug.simon@oracle.com>
parents: 5708
diff changeset
500
8506
c3657d00e343 -Merge with tip
Christos Kotselidis <christos.kotselidis@oracle.com>
parents: 8406
diff changeset
501 def specjbb2005(args):
16782
9f5e33cf8d52 Factored out the '_copyToJdk' function and allow copying files to jre/lib/ext.
Danilo Ansaloni <danilo.ansaloni@oracle.com>
parents: 16729
diff changeset
502 """run the composite SPECjbb2005 benchmark"""
11514
dc3c8df55905 added support for pylint and fixed errors/warnings it found
Doug Simon <doug.simon@oracle.com>
parents: 11512
diff changeset
503
11367
39b86b83ddeb normalized the command line interface for the dacapo, scaladacapo, specjvm2008, specjbb2005 and specjbb2013 commands
Doug Simon <doug.simon@oracle.com>
parents: 11359
diff changeset
504 def launcher(bm, harnessArgs, extraVmOpts):
39b86b83ddeb normalized the command line interface for the dacapo, scaladacapo, specjvm2008, specjbb2005 and specjbb2013 commands
Doug Simon <doug.simon@oracle.com>
parents: 11359
diff changeset
505 assert bm is None
22139
258eaaa98484 Initial split off from monolithic basic-graal repo
Doug Simon <doug.simon@oracle.com>
parents: 22108
diff changeset
506 return sanitycheck.getSPECjbb2005(harnessArgs).bench(get_vm(), extraVmOpts=extraVmOpts)
11514
dc3c8df55905 added support for pylint and fixed errors/warnings it found
Doug Simon <doug.simon@oracle.com>
parents: 11512
diff changeset
507
11367
39b86b83ddeb normalized the command line interface for the dacapo, scaladacapo, specjvm2008, specjbb2005 and specjbb2013 commands
Doug Simon <doug.simon@oracle.com>
parents: 11359
diff changeset
508 _run_benchmark(args, None, launcher)
8506
c3657d00e343 -Merge with tip
Christos Kotselidis <christos.kotselidis@oracle.com>
parents: 8406
diff changeset
509
22665
f3fd15b9c703 added jdkartifactstats command
Doug Simon <doug.simon@oracle.com>
parents: 22656
diff changeset
510 def jdkartifactstats(args):
f3fd15b9c703 added jdkartifactstats command
Doug Simon <doug.simon@oracle.com>
parents: 22656
diff changeset
511 """show stats about JDK deployed Graal artifacts"""
f3fd15b9c703 added jdkartifactstats command
Doug Simon <doug.simon@oracle.com>
parents: 22656
diff changeset
512 artifacts = {}
22800
bfb7523ffc03 fixed jdkartifactstats for JDK9 and made get_vm() compatability for both mx_jvmci:8 and mx_jvmci:9
Doug Simon <doug.simon@oracle.com>
parents: 22799
diff changeset
513 jdkDir = get_jvmci_jdk().home
bfb7523ffc03 fixed jdkartifactstats for JDK9 and made get_vm() compatability for both mx_jvmci:8 and mx_jvmci:9
Doug Simon <doug.simon@oracle.com>
parents: 22799
diff changeset
514 def _getDeployedJars():
bfb7523ffc03 fixed jdkartifactstats for JDK9 and made get_vm() compatability for both mx_jvmci:8 and mx_jvmci:9
Doug Simon <doug.simon@oracle.com>
parents: 22799
diff changeset
515 if get_jvmci_jdk().javaCompliance < '9':
bfb7523ffc03 fixed jdkartifactstats for JDK9 and made get_vm() compatability for both mx_jvmci:8 and mx_jvmci:9
Doug Simon <doug.simon@oracle.com>
parents: 22799
diff changeset
516 for root, _, filenames in os.walk(join(jdkDir, 'jre', 'lib')):
bfb7523ffc03 fixed jdkartifactstats for JDK9 and made get_vm() compatability for both mx_jvmci:8 and mx_jvmci:9
Doug Simon <doug.simon@oracle.com>
parents: 22799
diff changeset
517 for f in filenames:
bfb7523ffc03 fixed jdkartifactstats for JDK9 and made get_vm() compatability for both mx_jvmci:8 and mx_jvmci:9
Doug Simon <doug.simon@oracle.com>
parents: 22799
diff changeset
518 if f.endswith('.jar') and not f.endswith('.stripped.jar'):
bfb7523ffc03 fixed jdkartifactstats for JDK9 and made get_vm() compatability for both mx_jvmci:8 and mx_jvmci:9
Doug Simon <doug.simon@oracle.com>
parents: 22799
diff changeset
519 yield join(root, f)
bfb7523ffc03 fixed jdkartifactstats for JDK9 and made get_vm() compatability for both mx_jvmci:8 and mx_jvmci:9
Doug Simon <doug.simon@oracle.com>
parents: 22799
diff changeset
520 else:
bfb7523ffc03 fixed jdkartifactstats for JDK9 and made get_vm() compatability for both mx_jvmci:8 and mx_jvmci:9
Doug Simon <doug.simon@oracle.com>
parents: 22799
diff changeset
521 for jdkDist in jdkDeployedDists:
bfb7523ffc03 fixed jdkartifactstats for JDK9 and made get_vm() compatability for both mx_jvmci:8 and mx_jvmci:9
Doug Simon <doug.simon@oracle.com>
parents: 22799
diff changeset
522 dist = jdkDist.dist()
bfb7523ffc03 fixed jdkartifactstats for JDK9 and made get_vm() compatability for both mx_jvmci:8 and mx_jvmci:9
Doug Simon <doug.simon@oracle.com>
parents: 22799
diff changeset
523 if isinstance(jdkDist, JvmciJDKDeployedDist):
bfb7523ffc03 fixed jdkartifactstats for JDK9 and made get_vm() compatability for both mx_jvmci:8 and mx_jvmci:9
Doug Simon <doug.simon@oracle.com>
parents: 22799
diff changeset
524 yield dist.path
bfb7523ffc03 fixed jdkartifactstats for JDK9 and made get_vm() compatability for both mx_jvmci:8 and mx_jvmci:9
Doug Simon <doug.simon@oracle.com>
parents: 22799
diff changeset
525
bfb7523ffc03 fixed jdkartifactstats for JDK9 and made get_vm() compatability for both mx_jvmci:8 and mx_jvmci:9
Doug Simon <doug.simon@oracle.com>
parents: 22799
diff changeset
526 for jar in _getDeployedJars():
bfb7523ffc03 fixed jdkartifactstats for JDK9 and made get_vm() compatability for both mx_jvmci:8 and mx_jvmci:9
Doug Simon <doug.simon@oracle.com>
parents: 22799
diff changeset
527 f = basename(jar)
bfb7523ffc03 fixed jdkartifactstats for JDK9 and made get_vm() compatability for both mx_jvmci:8 and mx_jvmci:9
Doug Simon <doug.simon@oracle.com>
parents: 22799
diff changeset
528 if 'truffle' in f:
bfb7523ffc03 fixed jdkartifactstats for JDK9 and made get_vm() compatability for both mx_jvmci:8 and mx_jvmci:9
Doug Simon <doug.simon@oracle.com>
parents: 22799
diff changeset
529 if 'enterprise' in f:
bfb7523ffc03 fixed jdkartifactstats for JDK9 and made get_vm() compatability for both mx_jvmci:8 and mx_jvmci:9
Doug Simon <doug.simon@oracle.com>
parents: 22799
diff changeset
530 artifacts.setdefault('GraalEnterpriseTruffle', []).append(jar)
bfb7523ffc03 fixed jdkartifactstats for JDK9 and made get_vm() compatability for both mx_jvmci:8 and mx_jvmci:9
Doug Simon <doug.simon@oracle.com>
parents: 22799
diff changeset
531 else:
bfb7523ffc03 fixed jdkartifactstats for JDK9 and made get_vm() compatability for both mx_jvmci:8 and mx_jvmci:9
Doug Simon <doug.simon@oracle.com>
parents: 22799
diff changeset
532 artifacts.setdefault('GraalTruffle', []).append(jar)
bfb7523ffc03 fixed jdkartifactstats for JDK9 and made get_vm() compatability for both mx_jvmci:8 and mx_jvmci:9
Doug Simon <doug.simon@oracle.com>
parents: 22799
diff changeset
533 elif 'enterprise' in f:
bfb7523ffc03 fixed jdkartifactstats for JDK9 and made get_vm() compatability for both mx_jvmci:8 and mx_jvmci:9
Doug Simon <doug.simon@oracle.com>
parents: 22799
diff changeset
534 artifacts.setdefault('GraalEnterprise', []).append(jar)
bfb7523ffc03 fixed jdkartifactstats for JDK9 and made get_vm() compatability for both mx_jvmci:8 and mx_jvmci:9
Doug Simon <doug.simon@oracle.com>
parents: 22799
diff changeset
535 elif 'jvmci' in f:
bfb7523ffc03 fixed jdkartifactstats for JDK9 and made get_vm() compatability for both mx_jvmci:8 and mx_jvmci:9
Doug Simon <doug.simon@oracle.com>
parents: 22799
diff changeset
536 artifacts.setdefault('JVMCI', []).append(jar)
bfb7523ffc03 fixed jdkartifactstats for JDK9 and made get_vm() compatability for both mx_jvmci:8 and mx_jvmci:9
Doug Simon <doug.simon@oracle.com>
parents: 22799
diff changeset
537 elif 'graal' in f:
bfb7523ffc03 fixed jdkartifactstats for JDK9 and made get_vm() compatability for both mx_jvmci:8 and mx_jvmci:9
Doug Simon <doug.simon@oracle.com>
parents: 22799
diff changeset
538 artifacts.setdefault('Graal', []).append(jar)
bfb7523ffc03 fixed jdkartifactstats for JDK9 and made get_vm() compatability for both mx_jvmci:8 and mx_jvmci:9
Doug Simon <doug.simon@oracle.com>
parents: 22799
diff changeset
539 else:
bfb7523ffc03 fixed jdkartifactstats for JDK9 and made get_vm() compatability for both mx_jvmci:8 and mx_jvmci:9
Doug Simon <doug.simon@oracle.com>
parents: 22799
diff changeset
540 mx.logv('ignored: ' + jar)
22667
500e3cecfbff updated jdkartifactstats to show stripped jar sizes
Doug Simon <doug.simon@oracle.com>
parents: 22665
diff changeset
541
500e3cecfbff updated jdkartifactstats to show stripped jar sizes
Doug Simon <doug.simon@oracle.com>
parents: 22665
diff changeset
542 print '{:>10} {:>10} {:>10} {}'.format('All', 'NoVars', 'None', 'Jar')
22665
f3fd15b9c703 added jdkartifactstats command
Doug Simon <doug.simon@oracle.com>
parents: 22656
diff changeset
543 for category in sorted(artifacts.viewkeys()):
f3fd15b9c703 added jdkartifactstats command
Doug Simon <doug.simon@oracle.com>
parents: 22656
diff changeset
544 jars = artifacts[category]
f3fd15b9c703 added jdkartifactstats command
Doug Simon <doug.simon@oracle.com>
parents: 22656
diff changeset
545 if jars:
22667
500e3cecfbff updated jdkartifactstats to show stripped jar sizes
Doug Simon <doug.simon@oracle.com>
parents: 22665
diff changeset
546 totals = (0, 0, 0)
22665
f3fd15b9c703 added jdkartifactstats command
Doug Simon <doug.simon@oracle.com>
parents: 22656
diff changeset
547 print
f3fd15b9c703 added jdkartifactstats command
Doug Simon <doug.simon@oracle.com>
parents: 22656
diff changeset
548 for j in jars:
22667
500e3cecfbff updated jdkartifactstats to show stripped jar sizes
Doug Simon <doug.simon@oracle.com>
parents: 22665
diff changeset
549 gSize = os.path.getsize(j)
500e3cecfbff updated jdkartifactstats to show stripped jar sizes
Doug Simon <doug.simon@oracle.com>
parents: 22665
diff changeset
550 stripped = j[:-len('.jar')] + '.stripped.jar'
500e3cecfbff updated jdkartifactstats to show stripped jar sizes
Doug Simon <doug.simon@oracle.com>
parents: 22665
diff changeset
551 mx.run([mx.get_jdk().pack200, '--repack', '--quiet', '-J-Djava.util.logging.config.file=', '-DLocalVariableTypeTable=strip', '-DLocalVariableTable=strip', stripped, j])
500e3cecfbff updated jdkartifactstats to show stripped jar sizes
Doug Simon <doug.simon@oracle.com>
parents: 22665
diff changeset
552 gLinesSourceSize = os.path.getsize(stripped)
500e3cecfbff updated jdkartifactstats to show stripped jar sizes
Doug Simon <doug.simon@oracle.com>
parents: 22665
diff changeset
553 mx.run([mx.get_jdk().pack200, '--repack', '--quiet', '-J-Djava.util.logging.config.file=', '-G', stripped, j])
500e3cecfbff updated jdkartifactstats to show stripped jar sizes
Doug Simon <doug.simon@oracle.com>
parents: 22665
diff changeset
554 gNoneSize = os.path.getsize(stripped)
500e3cecfbff updated jdkartifactstats to show stripped jar sizes
Doug Simon <doug.simon@oracle.com>
parents: 22665
diff changeset
555 os.remove(stripped)
500e3cecfbff updated jdkartifactstats to show stripped jar sizes
Doug Simon <doug.simon@oracle.com>
parents: 22665
diff changeset
556 print '{:10,} {:10,} {:10,} {}:{}'.format(gSize, gLinesSourceSize, gNoneSize, category, basename(j))
500e3cecfbff updated jdkartifactstats to show stripped jar sizes
Doug Simon <doug.simon@oracle.com>
parents: 22665
diff changeset
557 t1, t2, t3 = totals
500e3cecfbff updated jdkartifactstats to show stripped jar sizes
Doug Simon <doug.simon@oracle.com>
parents: 22665
diff changeset
558 totals = (t1 + gSize, t2 + gLinesSourceSize, t3 + gNoneSize)
500e3cecfbff updated jdkartifactstats to show stripped jar sizes
Doug Simon <doug.simon@oracle.com>
parents: 22665
diff changeset
559 t1, t2, t3 = totals
500e3cecfbff updated jdkartifactstats to show stripped jar sizes
Doug Simon <doug.simon@oracle.com>
parents: 22665
diff changeset
560 print '{:10,} {:10,} {:10,} {}'.format(t1, t2, t3, category)
22665
f3fd15b9c703 added jdkartifactstats command
Doug Simon <doug.simon@oracle.com>
parents: 22656
diff changeset
561
22753
f74225bf6671 changes for compatibility with jvmci-9
Doug Simon <doug.simon@oracle.com>
parents: 22667
diff changeset
562 jvmLib = join(jdkDir, relativeVmLibDirInJdk(), get_vm(), mx.add_lib_suffix(mx.add_lib_prefix('jvm')))
22665
f3fd15b9c703 added jdkartifactstats command
Doug Simon <doug.simon@oracle.com>
parents: 22656
diff changeset
563 print
f3fd15b9c703 added jdkartifactstats command
Doug Simon <doug.simon@oracle.com>
parents: 22656
diff changeset
564 if exists(jvmLib):
22667
500e3cecfbff updated jdkartifactstats to show stripped jar sizes
Doug Simon <doug.simon@oracle.com>
parents: 22665
diff changeset
565 print '{:10,} {}'.format(os.path.getsize(jvmLib), jvmLib)
22665
f3fd15b9c703 added jdkartifactstats command
Doug Simon <doug.simon@oracle.com>
parents: 22656
diff changeset
566 else:
22667
500e3cecfbff updated jdkartifactstats to show stripped jar sizes
Doug Simon <doug.simon@oracle.com>
parents: 22665
diff changeset
567 print '{:>10} {}'.format('<missing>', jvmLib)
22665
f3fd15b9c703 added jdkartifactstats command
Doug Simon <doug.simon@oracle.com>
parents: 22656
diff changeset
568
22172
415ade97204c adapted to removal of mx_init() mechanism from mx2
Doug Simon <doug.simon@oracle.com>
parents: 22170
diff changeset
569 mx.update_commands(_suite, {
22319
42f424266138 moved ctw command to mx_graal.py and re-added graal.debug project declarations
Doug Simon <doug.simon@oracle.com>
parents: 22318
diff changeset
570 'ctw': [ctw, '[-vmoptions|noinline|nocomplex|full]'],
22172
415ade97204c adapted to removal of mx_init() mechanism from mx2
Doug Simon <doug.simon@oracle.com>
parents: 22170
diff changeset
571 'dacapo': [dacapo, '[VM options] benchmarks...|"all" [DaCapo options]'],
22665
f3fd15b9c703 added jdkartifactstats command
Doug Simon <doug.simon@oracle.com>
parents: 22656
diff changeset
572 'jdkartifactstats' : [jdkartifactstats, ''],
22172
415ade97204c adapted to removal of mx_init() mechanism from mx2
Doug Simon <doug.simon@oracle.com>
parents: 22170
diff changeset
573 'scaladacapo': [scaladacapo, '[VM options] benchmarks...|"all" [Scala DaCapo options]'],
415ade97204c adapted to removal of mx_init() mechanism from mx2
Doug Simon <doug.simon@oracle.com>
parents: 22170
diff changeset
574 'specjvm2008': [specjvm2008, '[VM options] benchmarks...|"all" [SPECjvm2008 options]'],
415ade97204c adapted to removal of mx_init() mechanism from mx2
Doug Simon <doug.simon@oracle.com>
parents: 22170
diff changeset
575 'specjbb2013': [specjbb2013, '[VM options] [-- [SPECjbb2013 options]]'],
415ade97204c adapted to removal of mx_init() mechanism from mx2
Doug Simon <doug.simon@oracle.com>
parents: 22170
diff changeset
576 'specjbb2005': [specjbb2005, '[VM options] [-- [SPECjbb2005 options]]'],
415ade97204c adapted to removal of mx_init() mechanism from mx2
Doug Simon <doug.simon@oracle.com>
parents: 22170
diff changeset
577 'bench' : [bench, '[-resultfile file] [all(default)|dacapo|specjvm2008|bootstrap]'],
415ade97204c adapted to removal of mx_init() mechanism from mx2
Doug Simon <doug.simon@oracle.com>
parents: 22170
diff changeset
578 'microbench' : [microbench, '[VM options] [-- [JMH options]]'],
415ade97204c adapted to removal of mx_init() mechanism from mx2
Doug Simon <doug.simon@oracle.com>
parents: 22170
diff changeset
579 'deoptalot' : [deoptalot, '[n]'],
415ade97204c adapted to removal of mx_init() mechanism from mx2
Doug Simon <doug.simon@oracle.com>
parents: 22170
diff changeset
580 'longtests' : [longtests, ''],
415ade97204c adapted to removal of mx_init() mechanism from mx2
Doug Simon <doug.simon@oracle.com>
parents: 22170
diff changeset
581 })
22644
54257f3273df Always put TRUFFLE_API on the bootclasspath
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents: 22626
diff changeset
582
54257f3273df Always put TRUFFLE_API on the bootclasspath
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents: 22626
diff changeset
583
54257f3273df Always put TRUFFLE_API on the bootclasspath
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents: 22626
diff changeset
584 def mx_post_parse_cmd_line(opts):
22753
f74225bf6671 changes for compatibility with jvmci-9
Doug Simon <doug.simon@oracle.com>
parents: 22667
diff changeset
585 add_bootclasspath_prepend(mx.distribution('truffle:TRUFFLE_API'))