Mercurial > hg > graal-compiler
changeset 22145:d5a51a47eb1b
mx: make bench command extensible
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 08 Jul 2015 11:23:43 +0200 |
parents | 13a10252efa4 |
children | 658d16b6d47e |
files | mx.graal/mx_graal.py mx.graal/sanitycheck.py mx.graal/suite.py |
diffstat | 3 files changed, 28 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mx.graal/mx_graal.py Tue Jul 07 14:33:58 2015 +0200 +++ b/mx.graal/mx_graal.py Wed Jul 08 11:23:43 2015 +0200 @@ -247,6 +247,8 @@ with Task('UnitTests:' + theVm + ':' + vmbuild, tasks) as t: if t: unittest(['-XX:CompileCommand=exclude,*::run*', 'graal.api', 'java.test']) +mx_jvmci.gateRunners.append(_graal_gate_runner) + def deoptalot(args): """bootstrap a VM with DeoptimizeALot and VerifyOops on @@ -267,6 +269,11 @@ dacapo(['100', 'eclipse', '-esa']) +""" +Extra benchmarks to run from 'bench()'. +""" +extraBenchmarks = [] + def bench(args): """run benchmarks and parse their output for results @@ -280,6 +287,15 @@ del args[index] else: mx.abort('-resultfile must be followed by a file name') + resultFileCSV = None + if '-resultfilecsv' in args: + index = args.index('-resultfilecsv') + if index + 1 < len(args): + resultFileCSV = args[index + 1] + del args[index] + del args[index] + else: + mx.abort('-resultfilecsv must be followed by a file name') vm = get_vm() if len(args) is 0: args = ['all'] @@ -337,6 +353,9 @@ if 'ctw-noinline' in args: benchmarks.append(sanitycheck.getCTW(vm, sanitycheck.CTWMode.NoInline)) + for f in extraBenchmarks: + f(args, vm, benchmarks) + for test in benchmarks: for (groupName, res) in test.bench(vm, extraVmOpts=vmArgs).items(): group = results.setdefault(groupName, {}) @@ -345,6 +364,12 @@ if resultFile: with open(resultFile, 'w') as f: f.write(json.dumps(results)) + if resultFileCSV: + with open(resultFileCSV, 'w') as f: + for key1, value1 in results.iteritems(): + f.write('%s;\n' % (str(key1))) + for key2, value2 in sorted(value1.iteritems()): + f.write('%s; %s;\n' % (str(key2), str(value2))) def specjvm2008(args): """run one or more SPECjvm2008 benchmarks"""
--- a/mx.graal/sanitycheck.py Tue Jul 07 14:33:58 2015 +0200 +++ b/mx.graal/sanitycheck.py Wed Jul 08 11:23:43 2015 +0200 @@ -26,6 +26,7 @@ from outputparser import OutputParser, ValuesMatcher import re, mx, mx_graal, os, sys, StringIO, subprocess from os.path import isfile, join, exists +import mx_jvmci gc = 'UseSerialGC' @@ -281,7 +282,7 @@ if vm == 'jvmci': args += ['-XX:+BootstrapGraal'] if mode >= CTWMode.NoInline: - if not mx_graal.isJVMCIEnabled(vm): + if not mx_jvmci.isJVMCIEnabled(vm): args.append('-XX:-Inline') else: args.append('-G:CompileTheWordConfig=-Inline')
--- a/mx.graal/suite.py Tue Jul 07 14:33:58 2015 +0200 +++ b/mx.graal/suite.py Wed Jul 08 11:23:43 2015 +0200 @@ -6,7 +6,7 @@ "suites": [ { "name" : "jvmci", - "version" : "ed35cb99842854869c6a18a3626064932db32968", + "version" : "8704244e4f6ae3739bfbc04fa20d24a2d5012e3b", "urls" : [ {"url" : "https://lafo.ssw.uni-linz.ac.at/hg/graal-jvmci-8", "kind" : "hg"}, ]