diff mx/commands.py @ 4536:8caa4f2df081

Added 'gv' command to mx for launching the GraalVisualizer. Added cleaning and building of the GraalVisualizer to the gate.
author Doug Simon <doug.simon@oracle.com>
date Thu, 09 Feb 2012 10:29:29 +0100
parents 58ecb156a3e8
children f1d3800b59e1
line wrap: on
line diff
--- a/mx/commands.py	Thu Feb 09 10:14:18 2012 +0100
+++ b/mx/commands.py	Thu Feb 09 10:29:29 2012 +0100
@@ -505,8 +505,6 @@
     If this command exits with a 0 exit code, then the source code is in
     a state that would be accepted for integration into the main repository."""
     
-    
-    
     class Task:
         def __init__(self, title):
             self.start = time.time()
@@ -549,6 +547,10 @@
         build(['--no-native'])
         tasks.append(t.stop())
     
+        t = Task('CleanAndBuildGraalVisualizer')
+        mx.run(['ant', '-f', join(_graal_home, 'visualizer', 'build.xml'), '-q', 'clean', 'build'])
+        tasks.append(t.stop())
+
         for vmbuild in ['fastdebug', 'product']:
             global _vmbuild
             _vmbuild = vmbuild
@@ -586,6 +588,10 @@
     mx.log('  =======')
     mx.log('  ' + str(total.duration))
 
+def gv(args):
+    """run the Graal Visualizer"""
+    mx.run(['ant', '-f', join(_graal_home, 'visualizer', 'build.xml'), '-q', 'run'])
+    
 def bench(args):
     """run benchmarks and parse their output for results
 
@@ -682,6 +688,7 @@
         'specjvm2008': [specjvm2008, '[VM options|@specjvm2008 options]'],
         'example': [example, '[-v] example names...'],
         'gate' : [gate, ''],
+        'gv' : [gv, ''],
         'bench' : [bench, '[-vm vm] [-resultfile file] [all(default)|dacapo|specjvm2008|bootstrap]'],
         'unittest' : [unittest, '[filters...]'],
         'vm': [vm, '[-options] class [args...]']