Mercurial > hg > truffle
comparison mx/commands.py @ 5229:ce6cb3a1eb44
mx dacapo, mx scaladacapo and mx specjvm2008 should use the specified vm
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Wed, 11 Apr 2012 15:38:00 +0200 |
parents | e91f0761c56d |
children | c1e5e3ab546d |
comparison
equal
deleted
inserted
replaced
5228:e0f17fb3e7d2 | 5229:ce6cb3a1eb44 |
---|---|
183 DaCapo options are distinguished from VM options by a '@' prefix. | 183 DaCapo options are distinguished from VM options by a '@' prefix. |
184 For example, '@--iterations @5' will pass '--iterations 5' to the | 184 For example, '@--iterations @5' will pass '--iterations 5' to the |
185 DaCapo harness.""" | 185 DaCapo harness.""" |
186 | 186 |
187 numTests = {} | 187 numTests = {} |
188 | |
189 if len(args) > 0: | 188 if len(args) > 0: |
190 level = getattr(sanitycheck.SanityCheckLevel, args[0], None) | 189 level = getattr(sanitycheck.SanityCheckLevel, args[0], None) |
191 if level is not None: | 190 if level is not None: |
192 del args[0] | 191 del args[0] |
193 for (bench, ns) in sanitycheck.dacapoSanityWarmup.items(): | 192 for (bench, ns) in sanitycheck.dacapoSanityWarmup.items(): |
216 # Extract DaCapo options | 215 # Extract DaCapo options |
217 dacapoArgs = [(arg[1:]) for arg in args if arg.startswith('@')] | 216 dacapoArgs = [(arg[1:]) for arg in args if arg.startswith('@')] |
218 | 217 |
219 # The remainder are VM options | 218 # The remainder are VM options |
220 vmOpts = [arg for arg in args if not arg.startswith('@')] | 219 vmOpts = [arg for arg in args if not arg.startswith('@')] |
220 vm = _vm | |
221 | 221 |
222 failed = [] | 222 failed = [] |
223 for (test, n) in numTests.items(): | 223 for (test, n) in numTests.items(): |
224 if not sanitycheck.getDacapo(test, n, dacapoArgs).test('graal', opts=vmOpts): | 224 if not sanitycheck.getDacapo(test, n, dacapoArgs).test(vm, opts=vmOpts): |
225 failed.append(test) | 225 failed.append(test) |
226 | 226 |
227 if len(failed) != 0: | 227 if len(failed) != 0: |
228 mx.abort('DaCapo failures: ' + str(failed)) | 228 mx.abort('DaCapo failures: ' + str(failed)) |
229 | 229 |
278 # Extract DaCapo options | 278 # Extract DaCapo options |
279 dacapoArgs = [(arg[1:]) for arg in args if arg.startswith('@')] | 279 dacapoArgs = [(arg[1:]) for arg in args if arg.startswith('@')] |
280 | 280 |
281 # The remainder are VM options | 281 # The remainder are VM options |
282 vmOpts = [arg for arg in args if not arg.startswith('@')] | 282 vmOpts = [arg for arg in args if not arg.startswith('@')] |
283 vm = _vm; | |
283 | 284 |
284 failed = [] | 285 failed = [] |
285 for (test, n) in numTests.items(): | 286 for (test, n) in numTests.items(): |
286 if not sanitycheck.getScalaDacapo(test, n, dacapoArgs).test('graal', opts=vmOpts): | 287 if not sanitycheck.getScalaDacapo(test, n, dacapoArgs).test(vm, opts=vmOpts): |
287 failed.append(test) | 288 failed.append(test) |
288 | 289 |
289 if len(failed) != 0: | 290 if len(failed) != 0: |
290 mx.abort('Scala DaCapo failures: ' + str(failed)) | 291 mx.abort('Scala DaCapo failures: ' + str(failed)) |
291 | 292 |
887 it = int(args[itIdx+1]) | 888 it = int(args[itIdx+1]) |
888 except: | 889 except: |
889 mx.abort('-it (Iteration time) needs a numeric value (seconds)') | 890 mx.abort('-it (Iteration time) needs a numeric value (seconds)') |
890 vmArgs.remove('-it') | 891 vmArgs.remove('-it') |
891 benchArgs.remove(args[itIdx+1]) | 892 benchArgs.remove(args[itIdx+1]) |
892 sanitycheck.getSPECjvm2008(benchArgs, skipValid, wt, it).bench('graal', opts=vmArgs) | 893 vm = _vm; |
894 sanitycheck.getSPECjvm2008(benchArgs, skipValid, wt, it).bench(vm, opts=vmArgs) | |
893 | 895 |
894 def hsdis(args): | 896 def hsdis(args): |
895 """install the hsdis library | 897 """install the hsdis library |
896 | 898 |
897 This is needed to support HotSpot's assembly dumping features. | 899 This is needed to support HotSpot's assembly dumping features. |