Mercurial > hg > truffle
diff mx/commands.py @ 5089:206e68bb66c6
Made the IdealGraphVisualizer runnable from mx with new 'igv' command.
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 15 Mar 2012 08:23:05 +0100 |
parents | 8a88c903e381 |
children | 0a1e5b876667 |
line wrap: on
line diff
--- a/mx/commands.py Wed Mar 14 21:54:42 2012 +0100 +++ b/mx/commands.py Thu Mar 15 08:23:05 2012 +0100 @@ -751,9 +751,19 @@ def gv(args): """run the Graal Visualizer""" with open(join(_graal_home, '.graal_visualizer.log'), 'w') as fp: - mx.log('[Graal Visualizer output is in ' + fp.name + ']') + mx.log('[Graal Visualizer log is in ' + fp.name + ']') + if not exists(join(_graal_home, 'visualizer', 'build.xml')): + mx.log('[This initial execution may take a while as the NetBeans platform needs to be downloaded]') mx.run(['ant', '-f', join(_graal_home, 'visualizer', 'build.xml'), '-l', fp.name, 'run']) +def igv(args): + """run the Ideal Graph Visualizer""" + with open(join(_graal_home, '.ideal_graph_visualizer.log'), 'w') as fp: + mx.log('[Ideal Graph Visualizer log is in ' + fp.name + ']') + if not exists(join(_graal_home, 'src', 'share', 'tools', 'IdealGraphVisualizer', 'nbplatform')): + mx.log('[This initial execution may take a while as the NetBeans platform needs to be downloaded]') + mx.run(['ant', '-f', join(_graal_home, 'src', 'share', 'tools', 'IdealGraphVisualizer', 'build.xml'), '-l', fp.name, 'run']) + def bench(args): """run benchmarks and parse their output for results @@ -876,6 +886,7 @@ 'buildvms': [buildvms, '[-options]'], 'clean': [clean, ''], 'hsdis': [hsdis, '[att]'], + 'igv' : [igv, ''], 'intro': [intro, ''], 'dacapo': [dacapo, '[[n] benchmark] [VM options|@DaCapo options]'], 'scaladacapo': [scaladacapo, '[[n] benchmark] [VM options|@Scala DaCapo options]'],