Mercurial > hg > graal-compiler
comparison mx/mx_graal.py @ 15593:e381346a8223
JMH: do not abort on missing jar file. Create necessary output directory if needed
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Thu, 08 May 2014 15:05:06 +0200 |
parents | ce201bb843b4 |
children | 62738ce98804 |
comparison
equal
deleted
inserted
replaced
15592:07ca8c86d31c | 15593:e381346a8223 |
---|---|
1621 | 1621 |
1622 vmArgs, benchmarksAndJsons = _extract_VM_args(args) | 1622 vmArgs, benchmarksAndJsons = _extract_VM_args(args) |
1623 | 1623 |
1624 benchmarks = [b for b in benchmarksAndJsons if not b.startswith('{')] | 1624 benchmarks = [b for b in benchmarksAndJsons if not b.startswith('{')] |
1625 jmhArgJsons = [b for b in benchmarksAndJsons if b.startswith('{')] | 1625 jmhArgJsons = [b for b in benchmarksAndJsons if b.startswith('{')] |
1626 | 1626 jmhOutDir = join(_graal_home, 'mx', 'jmh') |
1627 jmhArgs = {'-rff' : join(_graal_home, 'mx', 'jmh', 'jmh.out'), '-v' : 'EXTRA' if mx._opts.verbose else 'NORMAL'} | 1627 if not exists(jmhOutDir): |
1628 os.makedirs(jmhOutDir) | |
1629 jmhOut = join(jmhOutDir, 'jmh.out') | |
1630 jmhArgs = {'-rff' : jmhOut, '-v' : 'EXTRA' if mx._opts.verbose else 'NORMAL'} | |
1628 | 1631 |
1629 # e.g. '{"-wi" : 20}' | 1632 # e.g. '{"-wi" : 20}' |
1630 for j in jmhArgJsons: | 1633 for j in jmhArgJsons: |
1631 try: | 1634 try: |
1632 for n, v in json.loads(j).iteritems(): | 1635 for n, v in json.loads(j).iteritems(): |
1650 mx.logv('JMH: ignored ' + absoluteMicro + " because it doesn't start with 'micros-'") | 1653 mx.logv('JMH: ignored ' + absoluteMicro + " because it doesn't start with 'micros-'") |
1651 continue | 1654 continue |
1652 | 1655 |
1653 microJar = os.path.join(absoluteMicro, "target", "microbenchmarks.jar") | 1656 microJar = os.path.join(absoluteMicro, "target", "microbenchmarks.jar") |
1654 if not exists(microJar): | 1657 if not exists(microJar): |
1655 mx.abort('Missing ' + microJar + ' - please run "mx buildjmh"') | 1658 mx.log('Missing ' + microJar + ' - please run "mx buildjmh"') |
1659 continue | |
1656 if benchmarks: | 1660 if benchmarks: |
1657 def _addBenchmark(x): | 1661 def _addBenchmark(x): |
1658 if x.startswith("Benchmark:"): | 1662 if x.startswith("Benchmark:"): |
1659 return | 1663 return |
1660 match = False | 1664 match = False |