aboutsummaryrefslogtreecommitdiff
path: root/src/benchmark.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/benchmark.py')
-rw-r--r--src/benchmark.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/benchmark.py b/src/benchmark.py
index 35987f5..658a7f8 100644
--- a/src/benchmark.py
+++ b/src/benchmark.py
@@ -194,6 +194,8 @@ class Benchmark (object):
if tname not in self.results:
self.results[tname] = {}
+ old_ld_preload = os.environ.get("LD_PRELOAD", None)
+
os.environ["LD_PRELOAD"] = "build/print_status_on_exit.so "
os.environ["LD_PRELOAD"] += t["LD_PRELOAD"]
@@ -275,6 +277,11 @@ class Benchmark (object):
self.results[tname][perm] = []
self.results[tname][perm].append(result)
+ if old_ld_preload == None:
+ del(os.environ["LD_PRELOAD"])
+ else:
+ os.environ["LD_PRELOAD"] = old_ld_preload
+
if hasattr(self, "postallocator_hook"):
if self.postallocator_hook((tname, t), run,
verbose=src.globalvars.verbosity):