@staticmethod<EOL><INDENT>def parse_perfctr_event(perfctr):<DEDENT>
split_perfctr = perfctr.split('<STR_LIT::>')<EOL>assert len(split_perfctr) >= <NUM_LIT:2>, "<STR_LIT>"<EOL>event_tuple = split_perfctr[:<NUM_LIT:2>]<EOL>parameters = {}<EOL>for p in split_perfctr[<NUM_LIT:2>:]:<EOL><INDENT>if '<STR_LIT:=>' in p:<EOL><INDENT>k, v = p.split('<STR_LIT:=>')<EOL>if v.startswith('<STR_LIT>'):<EOL><INDENT>parameters[k] = int(v, <NUM_LIT:16>)<EOL><DEDENT>else:<EOL><INDENT>parameters[k] = int(v)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>parameters[p] = None<EOL><DEDENT><DEDENT>event_tuple.append(parameters)<EOL>return tuple(event_tuple)<EOL>
Parse events in machine description to tuple representation used in Benchmark module.

Examples:
>>> parse_perfctr_event('PERF_EVENT:REG[0-3]')
('PERF_EVENT', 'REG[0-3]')
>>> parse_perfctr_event('PERF_EVENT:REG[0-3]:STAY:FOO=23:BAR=0x23')
('PERF_EVENT', 'REG[0-3]', {'STAY': None, 'FOO': 23, 'BAR': 35})