aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/allocators/tbbmalloc.py2
-rw-r--r--src/benchmark.py8
-rw-r--r--src/benchmarks/larson.py4
-rw-r--r--src/util.py2
4 files changed, 10 insertions, 6 deletions
diff --git a/src/allocators/tbbmalloc.py b/src/allocators/tbbmalloc.py
index db24395..a5b28b7 100644
--- a/src/allocators/tbbmalloc.py
+++ b/src/allocators/tbbmalloc.py
@@ -16,7 +16,7 @@ class TBBMalloc (src.allocator.Allocator):
kwargs["LD_PRELOAD"] = "{dir}/libtbbmalloc.so"
kwargs["build_cmds"] = ["cd {srcdir}; make tbbmalloc -j4",
"mkdir -p {dir}",
- 'ln -f -s $(find {srcdir} -executable -name "*libtbbmalloc_proxy.so*") {dir}/libtbbmalloc.so']
+ 'ln -f -s $(find {srcdir} -executable -name "*libtbbmalloc_proxy.so*") {dir}/libtbbmalloc.so | head -1']
super().__init__(name, **kwargs)
diff --git a/src/benchmark.py b/src/benchmark.py
index 28b2b5c..e8caa9d 100644
--- a/src/benchmark.py
+++ b/src/benchmark.py
@@ -324,10 +324,12 @@ class Benchmark (object):
# Prepend cmd if we are not measuring servers
if self.server_cmds == []:
prefix_argv = alloc["cmd_prefix"].format(**substitutions).split()
- measure_argv = self.measure_cmd.format(**substitutions)
- measure_argv = src.util.prefix_cmd_with_abspath(measure_argv).split()
+ if self.measure_cmd != "":
+ measure_argv = self.measure_cmd.format(**substitutions)
+ measure_argv = src.util.prefix_cmd_with_abspath(measure_argv).split()
+
+ argv.extend(measure_argv)
- argv.extend(measure_argv)
argv.extend([f"{src.globalvars.builddir}/exec", "-p", env["LD_PRELOAD"]])
if alloc["LD_LIBRARY_PATH"] != "":
argv.extend(["-l", env["LD_LIBRARY_PATH"]])
diff --git a/src/benchmarks/larson.py b/src/benchmarks/larson.py
index 910fdf6..a5c4a02 100644
--- a/src/benchmarks/larson.py
+++ b/src/benchmarks/larson.py
@@ -14,10 +14,12 @@ class Benchmark_Larson(Benchmark):
transfers some objects (randomly selected) to
other threads to be freed."""
+ # Parameters taken from the paper "Memory Allocation for Long-Running Server
+ # Applications" from Larson and Krishnan
self.cmd = "larson{binary_suffix} 1 8 {maxsize} 1000 50000 1 {threads}"
self.args = {
- "maxsize": [8, 32, 64, 128, 256, 512, 1024],
+ "maxsize": [64, 512, 1024],
"threads": Benchmark.scale_threads_for_cpus(2)
}
diff --git a/src/util.py b/src/util.py
index 8549205..3a9367f 100644
--- a/src/util.py
+++ b/src/util.py
@@ -31,7 +31,7 @@ def prefix_cmd_with_abspath(cmd):
Usefull if cmd should be executed by the loader of a custom glibc."""
- if os.path.isabs(cmd):
+ if os.path.isabs(cmd) or cmd == "":
return cmd
binary_end = cmd.find(" ")