p = None
modified_lines = []
- for l in lines:
+ for i, l in enumerate(lines):
if l.startswith('DEF_PREDICTOR'):
+ next_line = lines[i + 1]
+ if l.endswith(','):
+ l += next_line
m = re.match('.*"(.*)".*', l)
p = m.group(1)
elif l == '':
parser = argparse.ArgumentParser()
parser.add_argument('location', metavar = 'dump_file',
- help = 'Location with SPEC benchmarks')
+ help = 'Sub-folder with SPEC benchmarks (e.g. Programming/cpu2017/benchspec/CPU)')
parser.add_argument('-s', '--sorting', dest = 'sorting',
choices = ['branches', 'branch-hitrate', 'hitrate', 'coverage', 'name'],
default = 'branches')
temp.close()
print()
- print(b)
+ print(f' {b} '.center(160, '='))
sys.stdout.flush()
p = [os.path.join(os.path.dirname(script_location), 'analyze_brprob.py'),
temp.name, '--sorting', args.sorting]
- if args.def_file != None:
+ if args.def_file:
p += ['-d', args.def_file]
+ if args.verbose:
+ p.append('-v')
p = subprocess.check_call(p)
sys.stdout.flush()