diff mx/commands.py @ 4219:47f7d91d34cf

Fix javac build issues with classpath WIP for benchmarks
author Gilles Duboscq <gilles.m.duboscq@gmail.com>
date Wed, 04 Jan 2012 22:54:27 +0100
parents a13d61d3910e
children 339cf8d4904d
line wrap: on
line diff
--- 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'