aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2019-08-12 18:21:44 +0200
committerFlorian Fischer <florian.fl.fischer@fau.de>2019-08-12 18:21:44 +0200
commitf3a2f62edd79deedff5e6ffaa1d2d7a9f3ac5d11 (patch)
treed2e36ab54882f9dd911e5569343179d29ba17511
parent3556ba5007193bb1bee5577b1e33a82936af7fe5 (diff)
downloadallocbench-f3a2f62edd79deedff5e6ffaa1d2d7a9f3ac5d11.tar.gz
allocbench-f3a2f62edd79deedff5e6ffaa1d2d7a9f3ac5d11.zip
fix benchmarks for any glibc version
use the included loader of the build glibc instead of LD_LIBRARY_PATH. Using LD_LIBRARY_PATH probably fails because of incompatible system loaders and newer glibc versions. Then we have to reverse the positions of {measure cmd} and {cmd prefix} in the exec chain because ld loads only ELF binaries and {measure cmd} could be a script.
-rw-r--r--src/allocators/glibc.py6
-rw-r--r--src/benchmark.py2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/allocators/glibc.py b/src/allocators/glibc.py
index 3842877..b9f0a9e 100644
--- a/src/allocators/glibc.py
+++ b/src/allocators/glibc.py
@@ -25,10 +25,10 @@ class Glibc (Allocator):
"cd glibc-build; make",
"cd glibc-build; make install"]
- # kwargs["cmd_prefix"] = ("{dir}/lib/ld-linux-x86-64.so.2 --library-path {dir}/lib:"
- # + library_path)
+ kwargs["cmd_prefix"] = ("{dir}/lib/ld-linux-x86-64.so.2 --library-path {dir}/lib:"
+ + library_path)
- kwargs["LD_LIBRARY_PATH"] = "{dir}/lib:" + library_path
+ # kwargs["LD_LIBRARY_PATH"] = "{dir}/lib:" + library_path
super().__init__(name, **kwargs)
diff --git a/src/benchmark.py b/src/benchmark.py
index 49af089..d8e7e81 100644
--- a/src/benchmark.py
+++ b/src/benchmark.py
@@ -325,8 +325,8 @@ class Benchmark (object):
measure_argv = self.measure_cmd.format(**substitutions)
measure_argv = src.util.prefix_cmd_with_abspath(measure_argv).split()
- argv.extend(prefix_argv)
argv.extend(measure_argv)
+ argv.extend(prefix_argv)
argv.extend(["build/exec", "-p", env["LD_PRELOAD"]])
if alloc["LD_LIBRARY_PATH"] != "":
argv.extend(["-l", env["LD_LIBRARY_PATH"]])