# HG changeset patch # User Doug Simon # Date 1359581991 -3600 # Node ID 2025455e7d806c00dce34052b9120de13d872a44 # Parent 7cae58134ff79c410f021d35628d5fa5449637bd added collection of compilation speed metric for C1 and C2 to bench command diff -r 7cae58134ff7 -r 2025455e7d80 mx/outputparser.py --- a/mx/outputparser.py Wed Jan 30 22:33:04 2013 +0100 +++ b/mx/outputparser.py Wed Jan 30 22:39:51 2013 +0100 @@ -23,6 +23,8 @@ # # ---------------------------------------------------------------------------------------------------- +import re + class OutputParser: def __init__(self): @@ -62,9 +64,8 @@ valueMaps.append(valueMap) def get_template_value(self, match, template): - if template.startswith('<'): - assert template.endswith('>') - groupName = template[1:-1] + def replace_var(m): + groupName = m.group(1) return match.group(groupName) - else: - return template + + return re.sub(r'<([\w]+)>', replace_var, template) diff -r 7cae58134ff7 -r 2025455e7d80 mx/sanitycheck.py --- a/mx/sanitycheck.py Wed Jan 30 22:33:04 2013 +0100 +++ b/mx/sanitycheck.py Wed Jan 30 22:39:51 2013 +0100 @@ -291,10 +291,14 @@ if self.benchmarkCompilationRate: opts.append('-XX:+CITime') - bps = re.compile(r"ParsedBytecodesPerSecond@final: (?P[0-9]+)") - ibps = re.compile(r"InlinedBytecodesPerSecond@final: (?P[0-9]+)") - parser.addMatcher(ValuesMatcher(bps, {'group' : 'ParsedBytecodesPerSecond', 'name' : self.name, 'score' : ''})) - parser.addMatcher(ValuesMatcher(ibps, {'group' : 'InlinedBytecodesPerSecond', 'name' : self.name, 'score' : ''})) + if vm == 'graal': + bps = re.compile(r"ParsedBytecodesPerSecond@final: (?P[0-9]+)") + ibps = re.compile(r"InlinedBytecodesPerSecond@final: (?P[0-9]+)") + parser.addMatcher(ValuesMatcher(bps, {'group' : 'ParsedBytecodesPerSecond', 'name' : self.name, 'score' : ''})) + parser.addMatcher(ValuesMatcher(ibps, {'group' : 'InlinedBytecodesPerSecond', 'name' : self.name, 'score' : ''})) + else: + ibps = re.compile(r"(?P[\w]+) compilation speed: +(?P[0-9]+) bytes/s {standard") + parser.addMatcher(ValuesMatcher(ibps, {'group' : 'InlinedBytecodesPerSecond', 'name' : ':' + self.name, 'score' : ''})) startDelim = 'START: ' + self.name endDelim = 'END: ' + self.name