comparison mx/sanitycheck.py @ 8501:41fc46da946a

-More fixes and passrate(fop)
author Christos Kotselidis <christos.kotselidis@oracle.com>
date Wed, 06 Mar 2013 19:35:04 +0100
parents 01aeaf194641
children dee7c8b578c7
comparison
equal deleted inserted replaced
8500:992f62c457b0 8501:41fc46da946a
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, commands, os, sys, StringIO, subprocess
28 from os.path import isfile, join, exists 28 from os.path import isfile, join, exists
29
30 gc='UseG1GC'
29 31
30 dacapoSanityWarmup = { 32 dacapoSanityWarmup = {
31 'avrora': [0, 0, 3, 6, 13], 33 'avrora': [0, 0, 3, 6, 13],
32 'batik': [0, 0, 5, 5, 20], 34 'batik': [0, 0, 5, 5, 20],
33 'eclipse': [2, 4, 5, 10, 16], 35 'eclipse': [2, 4, 5, 10, 16],
104 score = re.compile(r"^Valid run, Score is (?P<score>[0-9]+)$", re.MULTILINE) 106 score = re.compile(r"^Valid run, Score is (?P<score>[0-9]+)$", re.MULTILINE)
105 error = re.compile(r"VALIDATION ERROR") 107 error = re.compile(r"VALIDATION ERROR")
106 success = re.compile(r"^Valid run, Score is [0-9]+$", re.MULTILINE) 108 success = re.compile(r"^Valid run, Score is [0-9]+$", re.MULTILINE)
107 matcher = ValuesMatcher(score, {'group' : 'SPECjbb2005', 'name' : 'score', 'score' : '<score>'}) 109 matcher = ValuesMatcher(score, {'group' : 'SPECjbb2005', 'name' : 'score', 'score' : '<score>'})
108 classpath = ['jbb.jar', 'check.jar'] 110 classpath = ['jbb.jar', 'check.jar']
109 return Test("SPECjbb2005", ['spec.jbb.JBBmain', '-propfile', 'SPECjbb.props'] + benchArgs, [success], [error], [matcher], vmOpts=['-Xms3g', '-XX:+UseSerialGC', '-XX:-UseCompressedOops', '-cp', os.pathsep.join(classpath)], defaultCwd=specjbb2005) 111 return Test("SPECjbb2005", ['spec.jbb.JBBmain', '-propfile', 'SPECjbb.props'] + benchArgs, [success], [error], [matcher], vmOpts=['-Xms3g', '-XX:+'+gc, '-XX:-UseCompressedOops', '-cp', os.pathsep.join(classpath)], defaultCwd=specjbb2005)
110 112
111 def getSPECjbb2013(benchArgs = []): 113 def getSPECjbb2013(benchArgs = []):
112 114
113 specjbb2013 = mx.get_env('SPECJBB2013') 115 specjbb2013 = mx.get_env('SPECJBB2013')
114 if specjbb2013 is None or not exists(join(specjbb2013, 'specjbb2013.jar')): 116 if specjbb2013 is None or not exists(join(specjbb2013, 'specjbb2013.jar')):
117 jops = re.compile(r"^RUN RESULT: hbIR \(max attempted\) = [0-9]+, hbIR \(settled\) = [0-9]+, max-jOPS = (?P<max>[0-9]+), critical-jOPS = (?P<critical>[0-9]+)$", re.MULTILINE) 119 jops = re.compile(r"^RUN RESULT: hbIR \(max attempted\) = [0-9]+, hbIR \(settled\) = [0-9]+, max-jOPS = (?P<max>[0-9]+), critical-jOPS = (?P<critical>[0-9]+)$", re.MULTILINE)
118 #error? 120 #error?
119 success = re.compile(r"org.spec.jbb.controller: Run finished", re.MULTILINE) 121 success = re.compile(r"org.spec.jbb.controller: Run finished", re.MULTILINE)
120 matcherMax = ValuesMatcher(jops, {'group' : 'SPECjbb2013', 'name' : 'max', 'score' : '<max>'}) 122 matcherMax = ValuesMatcher(jops, {'group' : 'SPECjbb2013', 'name' : 'max', 'score' : '<max>'})
121 matcherCritical = ValuesMatcher(jops, {'group' : 'SPECjbb2013', 'name' : 'critical', 'score' : '<critical>'}) 123 matcherCritical = ValuesMatcher(jops, {'group' : 'SPECjbb2013', 'name' : 'critical', 'score' : '<critical>'})
122 return Test("SPECjbb2013", ['-jar', 'specjbb2013.jar', '-m', 'composite'] + benchArgs, [success], [], [matcherCritical, matcherMax], vmOpts=['-Xms7g', '-XX:+UseSerialGC', '-XX:-UseCompressedOops'], defaultCwd=specjbb2013) 124 return Test("SPECjbb2013", ['-jar', 'specjbb2013.jar', '-m', 'composite'] + benchArgs, [success], [], [matcherCritical, matcherMax], vmOpts=['-Xms7g', '-XX:+'+gc, '-XX:-UseCompressedOops'], defaultCwd=specjbb2013)
123 125
124 def getSPECjvm2008(benchArgs = [], skipCheck=False, skipKitValidation=False, warmupTime=None, iterationTime=None): 126 def getSPECjvm2008(benchArgs = [], skipCheck=False, skipKitValidation=False, warmupTime=None, iterationTime=None):
125 127
126 specjvm2008 = mx.get_env('SPECJVM2008') 128 specjvm2008 = mx.get_env('SPECJVM2008')
127 if specjvm2008 is None or not exists(join(specjvm2008, 'SPECjvm2008.jar')): 129 if specjvm2008 is None or not exists(join(specjvm2008, 'SPECjvm2008.jar')):
141 if skipKitValidation: 143 if skipKitValidation:
142 opts += ['-ikv'] 144 opts += ['-ikv']
143 if skipCheck: 145 if skipCheck:
144 opts += ['-ict'] 146 opts += ['-ict']
145 147
146 return Test("SPECjvm2008", ['-jar', 'SPECjvm2008.jar'] + opts + benchArgs, [success], [error], [matcher], vmOpts=['-Xms3g', '-XX:+UseSerialGC', '-XX:-UseCompressedOops'], defaultCwd=specjvm2008) 148 return Test("SPECjvm2008", ['-jar', 'SPECjvm2008.jar'] + opts + benchArgs, [success], [error], [matcher], vmOpts=['-Xms3g', '-XX:+'+gc, '-XX:-UseCompressedOops'], defaultCwd=specjvm2008)
147 149
148 def getDacapos(level=SanityCheckLevel.Normal, gateBuildLevel=None, dacapoArgs=[]): 150 def getDacapos(level=SanityCheckLevel.Normal, gateBuildLevel=None, dacapoArgs=[]):
149 checks = [] 151 checks = []
150 152
151 for (bench, ns) in dacapoSanityWarmup.items(): 153 for (bench, ns) in dacapoSanityWarmup.items():
173 dacapoTime1 = re.compile(r"===== DaCapo 9\.12 (?P<benchmark>[a-zA-Z0-9_]+) completed warmup 1 in (?P<time>[0-9]+) msec =====") 175 dacapoTime1 = re.compile(r"===== DaCapo 9\.12 (?P<benchmark>[a-zA-Z0-9_]+) completed warmup 1 in (?P<time>[0-9]+) msec =====")
174 176
175 dacapoMatcher = ValuesMatcher(dacapoTime, {'group' : 'DaCapo', 'name' : '<benchmark>', 'score' : '<time>'}) 177 dacapoMatcher = ValuesMatcher(dacapoTime, {'group' : 'DaCapo', 'name' : '<benchmark>', 'score' : '<time>'})
176 dacapoMatcher1 = ValuesMatcher(dacapoTime1, {'group' : 'DaCapo-1stRun', 'name' : '<benchmark>', 'score' : '<time>'}) 178 dacapoMatcher1 = ValuesMatcher(dacapoTime1, {'group' : 'DaCapo-1stRun', 'name' : '<benchmark>', 'score' : '<time>'})
177 179
178 return Test("DaCapo-" + name, ['-jar', dacapo, name, '-n', str(n), ] + dacapoArgs, [dacapoSuccess], [dacapoFail], [dacapoMatcher, dacapoMatcher1], ['-Xms2g', '-XX:+UseSerialGC', '-XX:-UseCompressedOops']) 180 return Test("DaCapo-" + name, ['-jar', dacapo, name, '-n', str(n), ] + dacapoArgs, [dacapoSuccess], [dacapoFail], [dacapoMatcher, dacapoMatcher1], ['-Xms2g', '-XX:+'+gc, '-XX:-UseCompressedOops'])
179 181
180 def getScalaDacapos(level=SanityCheckLevel.Normal, gateBuildLevel=None, dacapoArgs=[]): 182 def getScalaDacapos(level=SanityCheckLevel.Normal, gateBuildLevel=None, dacapoArgs=[]):
181 checks = [] 183 checks = []
182 184
183 for (bench, ns) in dacapoScalaSanityWarmup.items(): 185 for (bench, ns) in dacapoScalaSanityWarmup.items():
203 dacapoFail = re.compile(r"^===== DaCapo 0\.1\.0(-SNAPSHOT)? ([a-zA-Z0-9_]+) FAILED (warmup|) =====$", re.MULTILINE) 205 dacapoFail = re.compile(r"^===== DaCapo 0\.1\.0(-SNAPSHOT)? ([a-zA-Z0-9_]+) FAILED (warmup|) =====$", re.MULTILINE)
204 dacapoTime = re.compile(r"===== DaCapo 0\.1\.0(-SNAPSHOT)? (?P<benchmark>[a-zA-Z0-9_]+) PASSED in (?P<time>[0-9]+) msec =====") 206 dacapoTime = re.compile(r"===== DaCapo 0\.1\.0(-SNAPSHOT)? (?P<benchmark>[a-zA-Z0-9_]+) PASSED in (?P<time>[0-9]+) msec =====")
205 207
206 dacapoMatcher = ValuesMatcher(dacapoTime, {'group' : "Scala-DaCapo", 'name' : '<benchmark>', 'score' : '<time>'}) 208 dacapoMatcher = ValuesMatcher(dacapoTime, {'group' : "Scala-DaCapo", 'name' : '<benchmark>', 'score' : '<time>'})
207 209
208 return Test("Scala-DaCapo-" + name, ['-jar', dacapo, name, '-n', str(n), ] + dacapoArgs, [dacapoSuccess], [dacapoFail], [dacapoMatcher], ['-Xms2g', '-XX:+UseSerialGC', '-XX:-UseCompressedOops']) 210 return Test("Scala-DaCapo-" + name, ['-jar', dacapo, name, '-n', str(n), ] + dacapoArgs, [dacapoSuccess], [dacapoFail], [dacapoMatcher], ['-Xms2g', '-XX:+'+gc, '-XX:-UseCompressedOops'])
209 211
210 def getBootstraps(): 212 def getBootstraps():
211 time = re.compile(r"Bootstrapping Graal\.+ in (?P<time>[0-9]+) ms") 213 time = re.compile(r"Bootstrapping Graal\.+ in (?P<time>[0-9]+) ms")
212 scoreMatcher = ValuesMatcher(time, {'group' : 'Bootstrap', 'name' : 'BootstrapTime', 'score' : '<time>'}) 214 scoreMatcher = ValuesMatcher(time, {'group' : 'Bootstrap', 'name' : 'BootstrapTime', 'score' : '<time>'})
213 scoreMatcherBig = ValuesMatcher(time, {'group' : 'Bootstrap-bigHeap', 'name' : 'BootstrapTime', 'score' : '<time>'}) 215 scoreMatcherBig = ValuesMatcher(time, {'group' : 'Bootstrap-bigHeap', 'name' : 'BootstrapTime', 'score' : '<time>'})