Mercurial > hg > graal-jvmci-8
changeset 7570:2025455e7d80
added collection of compilation speed metric for C1 and C2 to bench command
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 30 Jan 2013 22:39:51 +0100 |
parents | 7cae58134ff7 |
children | 6078d41cecb2 |
files | mx/outputparser.py mx/sanitycheck.py |
diffstat | 2 files changed, 14 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- 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)
--- 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<rate>[0-9]+)") - ibps = re.compile(r"InlinedBytecodesPerSecond@final: (?P<rate>[0-9]+)") - parser.addMatcher(ValuesMatcher(bps, {'group' : 'ParsedBytecodesPerSecond', 'name' : self.name, 'score' : '<rate>'})) - parser.addMatcher(ValuesMatcher(ibps, {'group' : 'InlinedBytecodesPerSecond', 'name' : self.name, 'score' : '<rate>'})) + if vm == 'graal': + bps = re.compile(r"ParsedBytecodesPerSecond@final: (?P<rate>[0-9]+)") + ibps = re.compile(r"InlinedBytecodesPerSecond@final: (?P<rate>[0-9]+)") + parser.addMatcher(ValuesMatcher(bps, {'group' : 'ParsedBytecodesPerSecond', 'name' : self.name, 'score' : '<rate>'})) + parser.addMatcher(ValuesMatcher(ibps, {'group' : 'InlinedBytecodesPerSecond', 'name' : self.name, 'score' : '<rate>'})) + else: + ibps = re.compile(r"(?P<compiler>[\w]+) compilation speed: +(?P<rate>[0-9]+) bytes/s {standard") + parser.addMatcher(ValuesMatcher(ibps, {'group' : 'InlinedBytecodesPerSecond', 'name' : '<compiler>:' + self.name, 'score' : '<rate>'})) startDelim = 'START: ' + self.name endDelim = 'END: ' + self.name