comparison mx/sanitycheck.py @ 12769:99769479f9ce

s/commands/mx_graal/ in mx/sanitycheck.py
author Gilles Duboscq <duboscq@ssw.jku.at>
date Fri, 15 Nov 2013 11:20:18 +0100
parents b038b643a3a4
children 4cd7c6629841
comparison
equal deleted inserted replaced
12768:2842b357c316 12769:99769479f9ce
22 # questions. 22 # questions.
23 # 23 #
24 # ---------------------------------------------------------------------------------------------------- 24 # ----------------------------------------------------------------------------------------------------
25 25
26 from outputparser import OutputParser, ValuesMatcher 26 from outputparser import OutputParser, ValuesMatcher
27 import re, mx, commands, os, sys, StringIO, subprocess 27 import re, mx, mx_graal, os, sys, StringIO, subprocess
28 from os.path import isfile, join, exists 28 from os.path import isfile, join, exists
29 29
30 gc = 'UseSerialGC' 30 gc = 'UseSerialGC'
31 31
32 dacapoSanityWarmup = { 32 dacapoSanityWarmup = {
278 278
279 args = ['-XX:+CompileTheWorld', '-Xbootclasspath/p:' + rtjar] 279 args = ['-XX:+CompileTheWorld', '-Xbootclasspath/p:' + rtjar]
280 if vm == 'graal': 280 if vm == 'graal':
281 args += ['-XX:+BootstrapGraal'] 281 args += ['-XX:+BootstrapGraal']
282 if mode >= CTWMode.NoInline: 282 if mode >= CTWMode.NoInline:
283 if not commands.isGraalEnabled(vm): 283 if not mx_graal.isGraalEnabled(vm):
284 args.append('-XX:-Inline') 284 args.append('-XX:-Inline')
285 else: 285 else:
286 args.append('-G:-Inline') 286 args.append('-G:-Inline')
287 if mode >= CTWMode.NoComplex: 287 if mode >= CTWMode.NoComplex:
288 if commands.isGraalEnabled(vm): 288 if mx_graal.isGraalEnabled(vm):
289 args += ['-G:-OptLoopTransform', '-G:-OptTailDuplication', '-G:-FullUnroll', '-G:-MemoryAwareScheduling', '-G:-NewMemoryAwareScheduling', '-G:-PartialEscapeAnalysis'] 289 args += ['-G:-OptLoopTransform', '-G:-OptTailDuplication', '-G:-FullUnroll', '-G:-MemoryAwareScheduling', '-G:-NewMemoryAwareScheduling', '-G:-PartialEscapeAnalysis']
290 290
291 return Test("CompileTheWorld", args, successREs=[time], scoreMatchers=[scoreMatcher], benchmarkCompilationRate=False) 291 return Test("CompileTheWorld", args, successREs=[time], scoreMatchers=[scoreMatcher], benchmarkCompilationRate=False)
292 292
293 293
335 parser.addMatcher(ValuesMatcher(successRE, {'passed' : '1'})) 335 parser.addMatcher(ValuesMatcher(successRE, {'passed' : '1'}))
336 for failureRE in self.failureREs: 336 for failureRE in self.failureREs:
337 parser.addMatcher(ValuesMatcher(failureRE, {'failed' : '1'})) 337 parser.addMatcher(ValuesMatcher(failureRE, {'failed' : '1'}))
338 338
339 tee = Tee() 339 tee = Tee()
340 retcode = commands.vm(self.vmOpts + _noneAsEmptyList(extraVmOpts) + self.cmd, vm, nonZeroIsFatal=False, out=tee.eat, err=subprocess.STDOUT, cwd=cwd, vmbuild=vmbuild) 340 retcode = mx_graal.vm(self.vmOpts + _noneAsEmptyList(extraVmOpts) + self.cmd, vm, nonZeroIsFatal=False, out=tee.eat, err=subprocess.STDOUT, cwd=cwd, vmbuild=vmbuild)
341 output = tee.output.getvalue() 341 output = tee.output.getvalue()
342 valueMaps = parser.parse(output) 342 valueMaps = parser.parse(output)
343 343
344 if len(valueMaps) == 0: 344 if len(valueMaps) == 0:
345 return False 345 return False
408 mx.log(output) 408 mx.log(output)
409 mx.log(endDelim) 409 mx.log(endDelim)
410 else: 410 else:
411 tee = Tee() 411 tee = Tee()
412 mx.log(startDelim) 412 mx.log(startDelim)
413 if commands.vm(self.vmOpts + _noneAsEmptyList(extraVmOpts) + self.cmd, vm, nonZeroIsFatal=False, out=tee.eat, err=subprocess.STDOUT, cwd=cwd, vmbuild=vmbuild) != 0: 413 if mx_graal.vm(self.vmOpts + _noneAsEmptyList(extraVmOpts) + self.cmd, vm, nonZeroIsFatal=False, out=tee.eat, err=subprocess.STDOUT, cwd=cwd, vmbuild=vmbuild) != 0:
414 mx.abort("Benchmark failed (non-zero retcode)") 414 mx.abort("Benchmark failed (non-zero retcode)")
415 mx.log(endDelim) 415 mx.log(endDelim)
416 output = tee.output.getvalue() 416 output = tee.output.getvalue()
417 417
418 groups = {} 418 groups = {}