# HG changeset patch # User Gilles Duboscq # Date 1325714067 -3600 # Node ID 47f7d91d34cf3ab401b5fad84041c442cbe700a7 # Parent 03eaec130ed1b8616938f9e05c24c8dc67cf899c Fix javac build issues with classpath WIP for benchmarks diff -r 03eaec130ed1 -r 47f7d91d34cf mx/commands.py --- a/mx/commands.py Wed Jan 04 19:58:51 2012 +0100 +++ b/mx/commands.py Wed Jan 04 22:54:27 2012 +0100 @@ -313,10 +313,10 @@ os.environ.update(ARCH_DATA_MODEL='64', LANG='C', HOTSPOT_BUILD_JOBS='3', ALT_BOOTDIR=jdk, INSTALL='y') mx.run([mx.gmake_cmd(), build + 'graal'], cwd=join(_graal_home, 'make'), err=filterXusage) -def vm(args, vm='-graal', nonZeroIsFatal=True, out=None, err=None, cwd=None, timeout=None): +def vm(args, vm='-graal', nonZeroIsFatal=True, out=None, err=None, cwd=None, timeout=None, vmbuild=None): """run the GraalVM""" - - build = _vmbuild if _vmSourcesAvailable else 'product' + + build = vmbuild if vmbuild is not None else _vmbuild if _vmSourcesAvailable else 'product' if mx.java().debug: args = ['-Xdebug', '-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000'] + args exe = join(_jdk(build), 'bin', mx.exe_suffix('java')) @@ -570,9 +570,17 @@ mx.log(time.strftime('%d %b %Y %H:%M:%S - Gate done (duration - ' + str(duration) + ')')) def bench(args): + results = {} + #DaCapo + benchmarks = sanitycheck.getDacapos(level=sanitycheck.SanityCheckLevel.Benchmark) + #Bootstrap + benchmarks += sanitycheck.getBootstraps() - for test in sanitycheck.getDacapos(level=sanitycheck.SanityCheckLevel.Fast): - print test.bench('-graal') + for test in benchmarks: + if not results.has_key(test.group): + results[test.group] = {} + results[test.group].update(test.bench('-graal')) + print results def mx_init(): _vmbuild = 'product' diff -r 03eaec130ed1 -r 47f7d91d34cf mx/outputparser.py --- a/mx/outputparser.py Wed Jan 04 19:58:51 2012 +0100 +++ b/mx/outputparser.py Wed Jan 04 22:54:27 2012 +0100 @@ -10,7 +10,7 @@ def addMatcher(self, matcher): self.matchers.append(matcher) - def parse(self, vm, cmd, cwd=None): + def parse(self, vm, cmd, cwd=None, vmbuild=None): ret = [{}] def parseLine(line): @@ -27,7 +27,7 @@ else : mx.log( line.rstrip()) - retcode = commands.vm(cmd, nonZeroIsFatal=self.nonZeroIsFatal, out=parseLine, err=parseLine, cwd=cwd) + retcode = commands.vm(cmd, vm, nonZeroIsFatal=self.nonZeroIsFatal, out=parseLine, err=parseLine, cwd=cwd, vmbuild=vmbuild) return {'parsed' : ret, 'retcode' : retcode} class Matcher: diff -r 03eaec130ed1 -r 47f7d91d34cf mx/sanitycheck.py --- a/mx/sanitycheck.py Wed Jan 04 19:58:51 2012 +0100 +++ b/mx/sanitycheck.py Wed Jan 04 22:54:27 2012 +0100 @@ -6,24 +6,28 @@ from os.path import isfile dacapoSanityWarmup = { - 'avrora': [0, 0, 3, 6], - 'batik': [0 , 0, 5, 5], - 'eclipse': [2 , 4, 5, 10], - 'fop': [4 , 8, 10, 20], - 'h2': [0 , 0, 5, 5], - 'jython': [0 , 0, 5, 10], - 'luindex': [0 , 0, 5, 10], - 'lusearch': [0 , 4, 5, 10], - 'pmd': [0 , 0, 5, 10], - 'sunflow': [0 , 0, 5, 10], - 'tomcat': [0 , 0, 5, 10], - 'tradebeans': [0 , 0, 5, 10], - 'tradesoap': [2 , 4, 5, 10], - 'xalan': [0 , 0, 5, 10], + 'avrora': [0, 0, 3, 6, 10], + 'batik': [0 , 0, 5, 5, 20], + 'eclipse': [2 , 4, 5, 10, 13], + 'fop': [4 , 8, 10, 20, 30], + 'h2': [0 , 0, 5, 5, 5], + 'jython': [0 , 0, 5, 10, 10], + 'luindex': [0 , 0, 5, 10, 10], + 'lusearch': [0 , 4, 5, 5, 5], + 'pmd': [0 , 0, 5, 10, 10], + 'sunflow': [0 , 0, 5, 10, 15], + 'tomcat': [0 , 0, 5, 10, 10], + 'tradebeans': [0 , 0, 5, 10, 10], + 'tradesoap': [2 , 4, 5, 10, 10], + 'xalan': [0 , 0, 5, 10, 15], } class SanityCheckLevel: - Fast, Gate, Normal, Extensive = range(4) + Fast, Gate, Normal, Extensive, Benchmark = range(5) + +def getSPECjvm2008(): + score = re.compile(r"^((Score on|Noncompliant) )?(?P[a-zA-Z0-9\.-]+)( result)?: (?P[0-9]+,[0-9]+)( SPECjvm2008 Base)? ops/m$") + matcher = Matcher(score, {'const:name' : 'benchmark', 'const:score' : 'score'}) def getDacapos(level=SanityCheckLevel.Normal, dacapoArgs=[]): checks = [] @@ -50,6 +54,14 @@ return Test("DaCapo-" + name, "DaCapo", ['-jar', dacapo, name, '-n', str(n), ] + dacapoArgs, [dacapoSuccess], [dacapoFail], [dacapoMatcher], ['-Xms1g', '-Xmx2g', '-XX:MaxPermSize=256m']) +def getBootstraps(): + time = re.compile(r"Bootstrapping Graal............... in (?P