comparison mx/sanitycheck.py @ 9164:380857cb7117

Add the CTW result in to a different value depending on the mode
author Gilles Duboscq <duboscq@ssw.jku.at>
date Tue, 16 Apr 2013 19:13:56 +0200
parents a38d748d4130
children ff622b1b2c94
comparison
equal deleted inserted replaced
9163:45b37dcb24de 9164:380857cb7117
222 222
223 class CTWMode: 223 class CTWMode:
224 Full, NoInline, NoComplex = range(3) 224 Full, NoInline, NoComplex = range(3)
225 225
226 def getCTW(vm,mode): 226 def getCTW(vm,mode):
227
228 modeString = ''
229 if mode == CTWMode.Full:
230 modeString = 'Full'
231 elif mode == CTWMode.NoInline:
232 modeString = 'NoInline'
233 elif mode == CTWMode.NoComplex:
234 modeString = 'NoComplex'
235 else:
236 mx.abort("Unknown CTW mode")
237
227 time = re.compile(r"CompileTheWorld : Done \([0-9]+ classes, [0-9]+ methods, (?P<time>[0-9]+) ms\)") 238 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>'}) 239 scoreMatcher = ValuesMatcher(time, {'group' : 'CompileTheWorld', 'name' : modeString + '-CompileTime', 'score' : '<time>'})
229 240
230 jre = os.environ.get('JAVA_HOME') 241 jre = os.environ.get('JAVA_HOME')
231 if exists(join(jre, 'jre')): 242 if exists(join(jre, 'jre')):
232 jre = join(jre, 'jre') 243 jre = join(jre, 'jre')
233 rtjar = join(jre, 'lib', 'rt.jar') 244 rtjar = join(jre, 'lib', 'rt.jar')
243 args.append('-G:-Inline') 254 args.append('-G:-Inline')
244 if mode >= CTWMode.NoComplex: 255 if mode >= CTWMode.NoComplex:
245 if not vm.endswith('-nograal'): 256 if not vm.endswith('-nograal'):
246 args += ['-G:-OptLoopTransform', '-G:-OptTailDuplication', '-G:-FullUnroll', '-G:-MemoryAwareScheduling'] 257 args += ['-G:-OptLoopTransform', '-G:-OptTailDuplication', '-G:-FullUnroll', '-G:-MemoryAwareScheduling']
247 258
248 return Test("CompileTheWorld", args, successREs=[time], scoreMatchers=[scoreMatcher], benchmarkCompilationRate=False) 259 return Test("CompileTheWorld-" + mode, args, successREs=[time], scoreMatchers=[scoreMatcher], benchmarkCompilationRate=False)
249 260
250 261
251 class Tee: 262 class Tee:
252 def __init__(self): 263 def __init__(self):
253 self.output = StringIO.StringIO() 264 self.output = StringIO.StringIO()