Mercurial > hg > graal-compiler
annotate mx.graal/mx_graal_bench.py @ 23257:926fafcb44b8
only print stack traces from CompileTheWorld in verbose mode
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 05 Jan 2016 12:06:37 +0100 |
parents | debc2385369b |
children |
rev | line source |
---|---|
22952
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
1 # |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
2 # ---------------------------------------------------------------------------------------------------- |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
3 # |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
4 # Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
5 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
6 # |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
7 # This code is free software; you can redistribute it and/or modify it |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
8 # under the terms of the GNU General Public License version 2 only, as |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
9 # published by the Free Software Foundation. |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
10 # |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
11 # This code is distributed in the hope that it will be useful, but WITHOUT |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
14 # version 2 for more details (a copy is included in the LICENSE file that |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
15 # accompanied this code). |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
16 # |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
17 # You should have received a copy of the GNU General Public License version |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
18 # 2 along with this work; if not, write to the Free Software Foundation, |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
20 # |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
22 # or visit www.oracle.com if you need additional information or have any |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
23 # questions. |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
24 # |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
25 # ---------------------------------------------------------------------------------------------------- |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
26 |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
27 import sanitycheck |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
28 import itertools |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
29 import json |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
30 |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
31 import mx |
22954
debc2385369b
fixed mx_graal_bench for JDK9
Doug Simon <doug.simon@oracle.com>
parents:
22952
diff
changeset
|
32 import mx_graal |
22952
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
33 |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
34 def _run_benchmark(args, availableBenchmarks, runBenchmark): |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
35 |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
36 vmOpts, benchmarksAndOptions = mx.extract_VM_args(args, useDoubleDash=availableBenchmarks is None) |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
37 |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
38 if availableBenchmarks is None: |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
39 harnessArgs = benchmarksAndOptions |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
40 return runBenchmark(None, harnessArgs, vmOpts) |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
41 |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
42 if len(benchmarksAndOptions) == 0: |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
43 mx.abort('at least one benchmark name or "all" must be specified') |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
44 benchmarks = list(itertools.takewhile(lambda x: not x.startswith('-'), benchmarksAndOptions)) |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
45 harnessArgs = benchmarksAndOptions[len(benchmarks):] |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
46 |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
47 if 'all' in benchmarks: |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
48 benchmarks = availableBenchmarks |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
49 else: |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
50 for bm in benchmarks: |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
51 if bm not in availableBenchmarks: |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
52 mx.abort('unknown benchmark: ' + bm + '\nselect one of: ' + str(availableBenchmarks)) |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
53 |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
54 failed = [] |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
55 for bm in benchmarks: |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
56 if not runBenchmark(bm, harnessArgs, vmOpts): |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
57 failed.append(bm) |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
58 |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
59 if len(failed) != 0: |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
60 mx.abort('Benchmark failures: ' + str(failed)) |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
61 |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
62 def deoptalot(args): |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
63 """bootstrap a VM with DeoptimizeALot and VerifyOops on |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
64 |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
65 If the first argument is a number, the process will be repeated |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
66 this number of times. All other arguments are passed to the VM.""" |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
67 count = 1 |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
68 if len(args) > 0 and args[0].isdigit(): |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
69 count = int(args[0]) |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
70 del args[0] |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
71 |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
72 for _ in range(count): |
22954
debc2385369b
fixed mx_graal_bench for JDK9
Doug Simon <doug.simon@oracle.com>
parents:
22952
diff
changeset
|
73 if not mx_graal.run_vm(['-XX:-TieredCompilation', '-XX:+DeoptimizeALot', '-XX:+VerifyOops'] + args + ['-version']) == 0: |
22952
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
74 mx.abort("Failed") |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
75 |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
76 def longtests(args): |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
77 |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
78 deoptalot(['15', '-Xmx48m']) |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
79 |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
80 dacapo(['100', 'eclipse', '-esa']) |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
81 |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
82 def dacapo(args): |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
83 """run one or more DaCapo benchmarks""" |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
84 |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
85 def launcher(bm, harnessArgs, extraVmOpts): |
22954
debc2385369b
fixed mx_graal_bench for JDK9
Doug Simon <doug.simon@oracle.com>
parents:
22952
diff
changeset
|
86 return sanitycheck.getDacapo(bm, harnessArgs).test(mx_graal.get_vm(), extraVmOpts=extraVmOpts) |
22952
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
87 |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
88 _run_benchmark(args, sanitycheck.dacapoSanityWarmup.keys(), launcher) |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
89 |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
90 def scaladacapo(args): |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
91 """run one or more Scala DaCapo benchmarks""" |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
92 |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
93 def launcher(bm, harnessArgs, extraVmOpts): |
22954
debc2385369b
fixed mx_graal_bench for JDK9
Doug Simon <doug.simon@oracle.com>
parents:
22952
diff
changeset
|
94 return sanitycheck.getScalaDacapo(bm, harnessArgs).test(mx_graal.get_vm(), extraVmOpts=extraVmOpts) |
22952
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
95 |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
96 _run_benchmark(args, sanitycheck.dacapoScalaSanityWarmup.keys(), launcher) |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
97 |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
98 |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
99 """ |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
100 Extra benchmarks to run from 'bench()'. |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
101 """ |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
102 extraBenchmarks = [] |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
103 |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
104 def bench(args): |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
105 """run benchmarks and parse their output for results |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
106 |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
107 Results are JSON formated : {group : {benchmark : score}}.""" |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
108 resultFile = None |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
109 if '-resultfile' in args: |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
110 index = args.index('-resultfile') |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
111 if index + 1 < len(args): |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
112 resultFile = args[index + 1] |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
113 del args[index] |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
114 del args[index] |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
115 else: |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
116 mx.abort('-resultfile must be followed by a file name') |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
117 resultFileCSV = None |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
118 if '-resultfilecsv' in args: |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
119 index = args.index('-resultfilecsv') |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
120 if index + 1 < len(args): |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
121 resultFileCSV = args[index + 1] |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
122 del args[index] |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
123 del args[index] |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
124 else: |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
125 mx.abort('-resultfilecsv must be followed by a file name') |
22954
debc2385369b
fixed mx_graal_bench for JDK9
Doug Simon <doug.simon@oracle.com>
parents:
22952
diff
changeset
|
126 vm = mx_graal.get_vm() |
22952
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
127 if len(args) is 0: |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
128 args = ['all'] |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
129 |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
130 vmArgs = [arg for arg in args if arg.startswith('-')] |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
131 |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
132 def benchmarks_in_group(group): |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
133 prefix = group + ':' |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
134 return [a[len(prefix):] for a in args if a.startswith(prefix)] |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
135 |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
136 results = {} |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
137 benchmarks = [] |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
138 # DaCapo |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
139 if 'dacapo' in args or 'all' in args: |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
140 benchmarks += sanitycheck.getDacapos(level=sanitycheck.SanityCheckLevel.Benchmark) |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
141 else: |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
142 dacapos = benchmarks_in_group('dacapo') |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
143 for dacapo in dacapos: |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
144 if dacapo not in sanitycheck.dacapoSanityWarmup.keys(): |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
145 mx.abort('Unknown DaCapo : ' + dacapo) |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
146 iterations = sanitycheck.dacapoSanityWarmup[dacapo][sanitycheck.SanityCheckLevel.Benchmark] |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
147 if iterations > 0: |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
148 benchmarks += [sanitycheck.getDacapo(dacapo, ['-n', str(iterations)])] |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
149 |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
150 if 'scaladacapo' in args or 'all' in args: |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
151 benchmarks += sanitycheck.getScalaDacapos(level=sanitycheck.SanityCheckLevel.Benchmark) |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
152 else: |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
153 scaladacapos = benchmarks_in_group('scaladacapo') |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
154 for scaladacapo in scaladacapos: |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
155 if scaladacapo not in sanitycheck.dacapoScalaSanityWarmup.keys(): |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
156 mx.abort('Unknown Scala DaCapo : ' + scaladacapo) |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
157 iterations = sanitycheck.dacapoScalaSanityWarmup[scaladacapo][sanitycheck.SanityCheckLevel.Benchmark] |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
158 if iterations > 0: |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
159 benchmarks += [sanitycheck.getScalaDacapo(scaladacapo, ['-n', str(iterations)])] |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
160 |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
161 # Bootstrap |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
162 if 'bootstrap' in args or 'all' in args: |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
163 benchmarks += sanitycheck.getBootstraps() |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
164 # SPECjvm2008 |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
165 if 'specjvm2008' in args or 'all' in args: |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
166 benchmarks += [sanitycheck.getSPECjvm2008(['-ikv', '-wt', '120', '-it', '120'])] |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
167 else: |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
168 specjvms = benchmarks_in_group('specjvm2008') |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
169 for specjvm in specjvms: |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
170 benchmarks += [sanitycheck.getSPECjvm2008(['-ikv', '-wt', '120', '-it', '120', specjvm])] |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
171 |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
172 if 'specjbb2005' in args or 'all' in args: |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
173 benchmarks += [sanitycheck.getSPECjbb2005()] |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
174 |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
175 if 'specjbb2013' in args: # or 'all' in args //currently not in default set |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
176 benchmarks += [sanitycheck.getSPECjbb2013()] |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
177 |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
178 if 'ctw-full' in args: |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
179 benchmarks.append(sanitycheck.getCTW(vm, sanitycheck.CTWMode.Full)) |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
180 if 'ctw-noinline' in args: |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
181 benchmarks.append(sanitycheck.getCTW(vm, sanitycheck.CTWMode.NoInline)) |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
182 |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
183 for f in extraBenchmarks: |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
184 f(args, vm, benchmarks) |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
185 |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
186 for test in benchmarks: |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
187 for (groupName, res) in test.bench(vm, extraVmOpts=vmArgs).items(): |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
188 group = results.setdefault(groupName, {}) |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
189 group.update(res) |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
190 mx.log(json.dumps(results)) |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
191 if resultFile: |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
192 with open(resultFile, 'w') as f: |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
193 f.write(json.dumps(results)) |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
194 if resultFileCSV: |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
195 with open(resultFileCSV, 'w') as f: |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
196 for key1, value1 in results.iteritems(): |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
197 f.write('%s;\n' % (str(key1))) |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
198 for key2, value2 in sorted(value1.iteritems()): |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
199 f.write('%s; %s;\n' % (str(key2), str(value2))) |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
200 |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
201 def specjvm2008(args): |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
202 """run one or more SPECjvm2008 benchmarks""" |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
203 |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
204 def launcher(bm, harnessArgs, extraVmOpts): |
22954
debc2385369b
fixed mx_graal_bench for JDK9
Doug Simon <doug.simon@oracle.com>
parents:
22952
diff
changeset
|
205 return sanitycheck.getSPECjvm2008(harnessArgs + [bm]).bench(mx_graal.get_vm(), extraVmOpts=extraVmOpts) |
22952
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
206 |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
207 availableBenchmarks = set(sanitycheck.specjvm2008Names) |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
208 if "all" not in args: |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
209 # only add benchmark groups if we are not running "all" |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
210 for name in sanitycheck.specjvm2008Names: |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
211 parts = name.rsplit('.', 1) |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
212 if len(parts) > 1: |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
213 assert len(parts) == 2 |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
214 group = parts[0] |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
215 availableBenchmarks.add(group) |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
216 |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
217 _run_benchmark(args, sorted(availableBenchmarks), launcher) |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
218 |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
219 def specjbb2013(args): |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
220 """run the composite SPECjbb2013 benchmark""" |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
221 |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
222 def launcher(bm, harnessArgs, extraVmOpts): |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
223 assert bm is None |
22954
debc2385369b
fixed mx_graal_bench for JDK9
Doug Simon <doug.simon@oracle.com>
parents:
22952
diff
changeset
|
224 return sanitycheck.getSPECjbb2013(harnessArgs).bench(mx_graal.get_vm(), extraVmOpts=extraVmOpts) |
22952
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
225 |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
226 _run_benchmark(args, None, launcher) |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
227 |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
228 def specjbb2015(args): |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
229 """run the composite SPECjbb2015 benchmark""" |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
230 |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
231 def launcher(bm, harnessArgs, extraVmOpts): |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
232 assert bm is None |
22954
debc2385369b
fixed mx_graal_bench for JDK9
Doug Simon <doug.simon@oracle.com>
parents:
22952
diff
changeset
|
233 return sanitycheck.getSPECjbb2015(harnessArgs).bench(mx_graal.get_vm(), extraVmOpts=extraVmOpts) |
22952
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
234 |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
235 _run_benchmark(args, None, launcher) |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
236 |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
237 def specjbb2005(args): |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
238 """run the composite SPECjbb2005 benchmark""" |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
239 |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
240 def launcher(bm, harnessArgs, extraVmOpts): |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
241 assert bm is None |
22954
debc2385369b
fixed mx_graal_bench for JDK9
Doug Simon <doug.simon@oracle.com>
parents:
22952
diff
changeset
|
242 return sanitycheck.getSPECjbb2005(harnessArgs).bench(mx_graal.get_vm(), extraVmOpts=extraVmOpts) |
22952
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
243 |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
244 _run_benchmark(args, None, launcher) |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
245 |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
246 mx.update_commands(mx.suite('graal'), { |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
247 'dacapo': [dacapo, '[VM options] benchmarks...|"all" [DaCapo options]'], |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
248 'scaladacapo': [scaladacapo, '[VM options] benchmarks...|"all" [Scala DaCapo options]'], |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
249 'specjvm2008': [specjvm2008, '[VM options] benchmarks...|"all" [SPECjvm2008 options]'], |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
250 'specjbb2013': [specjbb2013, '[VM options] [-- [SPECjbb2013 options]]'], |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
251 'specjbb2015': [specjbb2015, '[VM options] [-- [SPECjbb2015 options]]'], |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
252 'specjbb2005': [specjbb2005, '[VM options] [-- [SPECjbb2005 options]]'], |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
253 'bench' : [bench, '[-resultfile file] [all(default)|dacapo|specjvm2008|bootstrap]'], |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
254 'deoptalot' : [deoptalot, '[n]'], |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
255 'longtests' : [longtests, ''], |
1ba34f16d176
Factor out benchmarks from mx_graal_n.py and add specjbb2015
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
diff
changeset
|
256 }) |