comparison 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
comparison
equal deleted inserted replaced
5088:74a0bbd671ba 5089:206e68bb66c6
749 mx.log(' ' + str(total.duration)) 749 mx.log(' ' + str(total.duration))
750 750
751 def gv(args): 751 def gv(args):
752 """run the Graal Visualizer""" 752 """run the Graal Visualizer"""
753 with open(join(_graal_home, '.graal_visualizer.log'), 'w') as fp: 753 with open(join(_graal_home, '.graal_visualizer.log'), 'w') as fp:
754 mx.log('[Graal Visualizer output is in ' + fp.name + ']') 754 mx.log('[Graal Visualizer log is in ' + fp.name + ']')
755 if not exists(join(_graal_home, 'visualizer', 'build.xml')):
756 mx.log('[This initial execution may take a while as the NetBeans platform needs to be downloaded]')
755 mx.run(['ant', '-f', join(_graal_home, 'visualizer', 'build.xml'), '-l', fp.name, 'run']) 757 mx.run(['ant', '-f', join(_graal_home, 'visualizer', 'build.xml'), '-l', fp.name, 'run'])
756 758
759 def igv(args):
760 """run the Ideal Graph Visualizer"""
761 with open(join(_graal_home, '.ideal_graph_visualizer.log'), 'w') as fp:
762 mx.log('[Ideal Graph Visualizer log is in ' + fp.name + ']')
763 if not exists(join(_graal_home, 'src', 'share', 'tools', 'IdealGraphVisualizer', 'nbplatform')):
764 mx.log('[This initial execution may take a while as the NetBeans platform needs to be downloaded]')
765 mx.run(['ant', '-f', join(_graal_home, 'src', 'share', 'tools', 'IdealGraphVisualizer', 'build.xml'), '-l', fp.name, 'run'])
766
757 def bench(args): 767 def bench(args):
758 """run benchmarks and parse their output for results 768 """run benchmarks and parse their output for results
759 769
760 Results are JSON formated : {group : {benchmark : score}}.""" 770 Results are JSON formated : {group : {benchmark : score}}."""
761 resultFile = None 771 resultFile = None
874 commands = { 884 commands = {
875 'build': [build, '[-options]'], 885 'build': [build, '[-options]'],
876 'buildvms': [buildvms, '[-options]'], 886 'buildvms': [buildvms, '[-options]'],
877 'clean': [clean, ''], 887 'clean': [clean, ''],
878 'hsdis': [hsdis, '[att]'], 888 'hsdis': [hsdis, '[att]'],
889 'igv' : [igv, ''],
879 'intro': [intro, ''], 890 'intro': [intro, ''],
880 'dacapo': [dacapo, '[[n] benchmark] [VM options|@DaCapo options]'], 891 'dacapo': [dacapo, '[[n] benchmark] [VM options|@DaCapo options]'],
881 'scaladacapo': [scaladacapo, '[[n] benchmark] [VM options|@Scala DaCapo options]'], 892 'scaladacapo': [scaladacapo, '[[n] benchmark] [VM options|@Scala DaCapo options]'],
882 'specjvm2008': [specjvm2008, '[VM options|@specjvm2008 options]'], 893 'specjvm2008': [specjvm2008, '[VM options|@specjvm2008 options]'],
883 'example': [example, '[-v] example names...'], 894 'example': [example, '[-v] example names...'],