summaryrefslogtreecommitdiff
path: root/bin/generate-dfa-benchmark.py
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2019-08-15 11:49:05 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2019-08-15 11:49:05 +0200
commitd38c3a191c44806d87584b7bd6052072820bcea3 (patch)
tree2f280d7612212a6d9b8d76f36956255aeff75d69 /bin/generate-dfa-benchmark.py
parent45952580a0acd645d032509908d0a82f72bd9c74 (diff)
Fix generate-dfa-benchmark leaving out benchmark parts when splitting runs
Diffstat (limited to 'bin/generate-dfa-benchmark.py')
-rwxr-xr-xbin/generate-dfa-benchmark.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/generate-dfa-benchmark.py b/bin/generate-dfa-benchmark.py
index 4fb8df4..9919d68 100755
--- a/bin/generate-dfa-benchmark.py
+++ b/bin/generate-dfa-benchmark.py
@@ -136,9 +136,10 @@ def run_benchmark(application_file: str, pta: PTA, runs: list, arch: str, app: s
if needs_split:
print('[MAKE] benchmark code is too large, splitting up')
mid = len(runs) // 2
- results = run_benchmark(application_file, pta, runs[:mid], arch, app, run_args, harness, sleep, repeat, run_offset = run_offset, runs_total = runs_total)
+ # Previously prepared trace data is useless
harness.reset()
- results.extend(run_benchmark(application_file, pta, runs[mid:], arch, app, run_args, harness, sleep, repeat, run_offset = run_offset + mid, runs_total = runs_total))
+ results = run_benchmark(application_file, pta, runs[:mid], arch, app, run_args, harness.copy(), sleep, repeat, run_offset = run_offset, runs_total = runs_total)
+ results.extend(run_benchmark(application_file, pta, runs[mid:], arch, app, run_args, harness.copy(), sleep, repeat, run_offset = run_offset + mid, runs_total = runs_total))
return results
runner.flash(arch, app, run_args)
@@ -242,7 +243,7 @@ if __name__ == '__main__':
json_out = {
'opt' : opt,
'pta' : pta.to_json(),
- 'traces' : harness.traces,
+ 'traces' : list(map(lambda x: x[1].traces, results)),
'raw_output' : list(map(lambda x: x[2], results)),
}
with open(time.strftime('ptalog-%Y%m%d-%H%M%S.json'), 'w') as f: