diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2018-08-07 16:45:38 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2018-08-07 16:45:38 +0200 |
| commit | 37d0d9b4b37ca15cf0ee1937b94fe47142f18e5a (patch) | |
| tree | fe494d2bb1c54557b5a162598dccde548c4539bf /falsesharing.py | |
| parent | 4c436b40f9e3a8bce02f36275b0320f783a52aea (diff) | |
| download | allocbench-37d0d9b4b37ca15cf0ee1937b94fe47142f18e5a.tar.gz allocbench-37d0d9b4b37ca15cf0ee1937b94fe47142f18e5a.zip | |
make loop and falsesharing work with different perf outputs
Diffstat (limited to 'falsesharing.py')
| -rw-r--r-- | falsesharing.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/falsesharing.py b/falsesharing.py index e04e7cf..2d8c5f0 100644 --- a/falsesharing.py +++ b/falsesharing.py @@ -118,8 +118,13 @@ class Benchmark_Falsesharing( Benchmark ): d = [] for m in measures: d.append(m["time"]) - misses = float(m["L1-dcache-load-misses"]) - loads = float(m["L1-dcache-loads"]) + misses = 0 + loads = 0 + for e in m: + if "L1-dcache-load-misses" in e: + misses = float(m[e]) + elif "L1-dcache-loads" in e: + loads = float(m[e]) l1_load_misses.append(misses/loads) y_vals[y_mapping[mid[1]]] = single_threaded / np.mean(d) s = "{} {} {}: {:.3f}%".format(bench, target, mid[1], np.mean(l1_load_misses)*100) |
