aboutsummaryrefslogtreecommitdiff
path: root/falsesharing.py
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2018-08-18 14:53:31 +0200
committerFlorian Fischer <florian.fl.fischer@fau.de>2018-08-18 14:53:31 +0200
commit867e0de8170a1a13696391883947e426520ae134 (patch)
tree17fd4a97d9ea62c81ce1018a971d70f714dce860 /falsesharing.py
parent0e701f823c97e7c68da34ca19f544b47bb066824 (diff)
downloadallocbench-867e0de8170a1a13696391883947e426520ae134.tar.gz
allocbench-867e0de8170a1a13696391883947e426520ae134.zip
make targets into directories and add a color attribute
Diffstat (limited to 'falsesharing.py')
-rw-r--r--falsesharing.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/falsesharing.py b/falsesharing.py
index 2d8c5f0..b5d7a9f 100644
--- a/falsesharing.py
+++ b/falsesharing.py
@@ -55,11 +55,11 @@ class Benchmark_Falsesharing( Benchmark ):
for tname, t in self.targets.items():
result = {}
- os.environ["LD_PRELOAD"] = t[1]
+ os.environ["LD_PRELOAD"] = t["LD_PRELOAD"]
for bench in ["thrash", "scratch"]:
- target_cmd = cmd.format(bench, t[0], threads).split(" ")
+ target_cmd = cmd.format(bench, t["binary_suffix"], threads).split(" ")
if verbose:
print("\n" + tname, t, "\n", " ".join(target_cmd), "\n")
@@ -81,7 +81,7 @@ class Benchmark_Falsesharing( Benchmark ):
return False
if "ERROR: ld.so" in output:
- print("\nPreloading of", t[1], "failed for", tname,
+ print("\nPreloading of", t["LD_PRELOAD"], "failed for", tname,
".\n Aborting Benchmark.")
print(output)
return False
@@ -129,7 +129,7 @@ class Benchmark_Falsesharing( Benchmark ):
y_vals[y_mapping[mid[1]]] = single_threaded / np.mean(d)
s = "{} {} {}: {:.3f}%".format(bench, target, mid[1], np.mean(l1_load_misses)*100)
print(s)
- plt.plot(nthreads, y_vals, marker='.', linestyle='-', label=target)
+ plt.plot(nthreads, y_vals, marker='.', linestyle='-', label=target, color=targets[target]["color"])
plt.legend()
plt.xlabel("threads")