comparison mx/sanitycheck.py @ 9157:a38d748d4130

Add support for the 'optimized' build in mx Add some CompileTheWorld benchmarks
author Gilles Duboscq <duboscq@ssw.jku.at>
date Tue, 16 Apr 2013 14:31:00 +0200
parents c3657d00e343
children 380857cb7117
comparison
equal deleted inserted replaced
9145:57f85e39c75f 9157:a38d748d4130
217 217
218 tests = [] 218 tests = []
219 tests.append(Test("Bootstrap", ['-version'], successREs=[time], scoreMatchers=[scoreMatcher], ignoredVMs=['client', 'server'], benchmarkCompilationRate=False)) 219 tests.append(Test("Bootstrap", ['-version'], successREs=[time], scoreMatchers=[scoreMatcher], ignoredVMs=['client', 'server'], benchmarkCompilationRate=False))
220 tests.append(Test("Bootstrap-bigHeap", ['-version'], successREs=[time], scoreMatchers=[scoreMatcherBig], vmOpts=['-Xms2g'], ignoredVMs=['client', 'server'], benchmarkCompilationRate=False)) 220 tests.append(Test("Bootstrap-bigHeap", ['-version'], successREs=[time], scoreMatchers=[scoreMatcherBig], vmOpts=['-Xms2g'], ignoredVMs=['client', 'server'], benchmarkCompilationRate=False))
221 return tests 221 return tests
222
223 class CTWMode:
224 Full, NoInline, NoComplex = range(3)
225
226 def getCTW(vm,mode):
227 time = re.compile(r"CompileTheWorld : Done \([0-9]+ classes, [0-9]+ methods, (?P<time>[0-9]+) ms\)")
228 scoreMatcher = ValuesMatcher(time, {'group' : 'CompileTheWorld', 'name' : 'CompileTime', 'score' : '<time>'})
229
230 jre = os.environ.get('JAVA_HOME')
231 if exists(join(jre, 'jre')):
232 jre = join(jre, 'jre')
233 rtjar = join(jre, 'lib', 'rt.jar')
234
235
236 args = ['-XX:+CompileTheWorld', '-Xbootclasspath/p:' + rtjar]
237 if not vm.endswith('-nograal'):
238 args.append('-G:-Debug')
239 if mode >= CTWMode.NoInline:
240 if vm.endswith('-nograal'):
241 args.append('-XX:-Inline')
242 else:
243 args.append('-G:-Inline')
244 if mode >= CTWMode.NoComplex:
245 if not vm.endswith('-nograal'):
246 args += ['-G:-OptLoopTransform', '-G:-OptTailDuplication', '-G:-FullUnroll', '-G:-MemoryAwareScheduling']
247
248 return Test("CompileTheWorld", args, successREs=[time], scoreMatchers=[scoreMatcher], benchmarkCompilationRate=False)
249
222 250
223 class Tee: 251 class Tee:
224 def __init__(self): 252 def __init__(self):
225 self.output = StringIO.StringIO() 253 self.output = StringIO.StringIO()
226 def eat(self, line): 254 def eat(self, line):