Mercurial > hg > truffle
comparison 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 |
comparison
equal
deleted
inserted
replaced
4535:10f300ba182f | 4536:8caa4f2df081 |
---|---|
503 """run the tests used to validate a push | 503 """run the tests used to validate a push |
504 | 504 |
505 If this command exits with a 0 exit code, then the source code is in | 505 If this command exits with a 0 exit code, then the source code is in |
506 a state that would be accepted for integration into the main repository.""" | 506 a state that would be accepted for integration into the main repository.""" |
507 | 507 |
508 | |
509 | |
510 class Task: | 508 class Task: |
511 def __init__(self, title): | 509 def __init__(self, title): |
512 self.start = time.time() | 510 self.start = time.time() |
513 self.title = title | 511 self.title = title |
514 self.end = None | 512 self.end = None |
547 | 545 |
548 t = Task('BuildJava') | 546 t = Task('BuildJava') |
549 build(['--no-native']) | 547 build(['--no-native']) |
550 tasks.append(t.stop()) | 548 tasks.append(t.stop()) |
551 | 549 |
550 t = Task('CleanAndBuildGraalVisualizer') | |
551 mx.run(['ant', '-f', join(_graal_home, 'visualizer', 'build.xml'), '-q', 'clean', 'build']) | |
552 tasks.append(t.stop()) | |
553 | |
552 for vmbuild in ['fastdebug', 'product']: | 554 for vmbuild in ['fastdebug', 'product']: |
553 global _vmbuild | 555 global _vmbuild |
554 _vmbuild = vmbuild | 556 _vmbuild = vmbuild |
555 | 557 |
556 t = Task('BuildHotSpot:' + vmbuild) | 558 t = Task('BuildHotSpot:' + vmbuild) |
584 for t in tasks: | 586 for t in tasks: |
585 mx.log(' ' + str(t.duration) + '\t' + t.title) | 587 mx.log(' ' + str(t.duration) + '\t' + t.title) |
586 mx.log(' =======') | 588 mx.log(' =======') |
587 mx.log(' ' + str(total.duration)) | 589 mx.log(' ' + str(total.duration)) |
588 | 590 |
591 def gv(args): | |
592 """run the Graal Visualizer""" | |
593 mx.run(['ant', '-f', join(_graal_home, 'visualizer', 'build.xml'), '-q', 'run']) | |
594 | |
589 def bench(args): | 595 def bench(args): |
590 """run benchmarks and parse their output for results | 596 """run benchmarks and parse their output for results |
591 | 597 |
592 Results are JSON formated : {group : {benchmark : score}}.""" | 598 Results are JSON formated : {group : {benchmark : score}}.""" |
593 resultFile = None | 599 resultFile = None |
680 'dacapo': [dacapo, '[[n] benchmark] [VM options|@DaCapo options]'], | 686 'dacapo': [dacapo, '[[n] benchmark] [VM options|@DaCapo options]'], |
681 'scaladacapo': [scaladacapo, '[[n] benchmark] [VM options|@Scala DaCapo options]'], | 687 'scaladacapo': [scaladacapo, '[[n] benchmark] [VM options|@Scala DaCapo options]'], |
682 'specjvm2008': [specjvm2008, '[VM options|@specjvm2008 options]'], | 688 'specjvm2008': [specjvm2008, '[VM options|@specjvm2008 options]'], |
683 'example': [example, '[-v] example names...'], | 689 'example': [example, '[-v] example names...'], |
684 'gate' : [gate, ''], | 690 'gate' : [gate, ''], |
691 'gv' : [gv, ''], | |
685 'bench' : [bench, '[-vm vm] [-resultfile file] [all(default)|dacapo|specjvm2008|bootstrap]'], | 692 'bench' : [bench, '[-vm vm] [-resultfile file] [all(default)|dacapo|specjvm2008|bootstrap]'], |
686 'unittest' : [unittest, '[filters...]'], | 693 'unittest' : [unittest, '[filters...]'], |
687 'vm': [vm, '[-options] class [args...]'] | 694 'vm': [vm, '[-options] class [args...]'] |
688 } | 695 } |
689 | 696 |