Mercurial > hg > graal-jvmci-8
comparison mx/commands.py @ 8459:3393f870e6a4
Allow vm arguments in mx bench
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Mon, 25 Mar 2013 11:08:50 +0100 |
parents | 2d0160c35f8f |
children | 6ed17512f672 |
comparison
equal
deleted
inserted
replaced
8458:5d0296347367 | 8459:3393f870e6a4 |
---|---|
1023 else: | 1023 else: |
1024 mx.abort('-resultfile must be followed by a file name') | 1024 mx.abort('-resultfile must be followed by a file name') |
1025 vm = _vm | 1025 vm = _vm |
1026 if len(args) is 0: | 1026 if len(args) is 0: |
1027 args = ['all'] | 1027 args = ['all'] |
1028 | |
1029 vmArgs = [arg for arg in args if arg.startswith('-')] | |
1028 | 1030 |
1029 def benchmarks_in_group(group): | 1031 def benchmarks_in_group(group): |
1030 prefix = group + ':' | 1032 prefix = group + ':' |
1031 return [a[len(prefix):] for a in args if a.startswith(prefix)] | 1033 return [a[len(prefix):] for a in args if a.startswith(prefix)] |
1032 | 1034 |
1067 | 1069 |
1068 if ('specjbb2013' in args): # or 'all' in args //currently not in default set | 1070 if ('specjbb2013' in args): # or 'all' in args //currently not in default set |
1069 benchmarks += [sanitycheck.getSPECjbb2013()] | 1071 benchmarks += [sanitycheck.getSPECjbb2013()] |
1070 | 1072 |
1071 for test in benchmarks: | 1073 for test in benchmarks: |
1072 for (groupName, res) in test.bench(vm).items(): | 1074 for (groupName, res) in test.bench(vm, opts=vmArgs).items(): |
1073 group = results.setdefault(groupName, {}) | 1075 group = results.setdefault(groupName, {}) |
1074 group.update(res) | 1076 group.update(res) |
1075 mx.log(json.dumps(results)) | 1077 mx.log(json.dumps(results)) |
1076 if resultFile: | 1078 if resultFile: |
1077 with open(resultFile, 'w') as f: | 1079 with open(resultFile, 'w') as f: |