aboutsummaryrefslogtreecommitdiff
path: root/src/allocators/glibc.py
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2019-06-24 14:51:21 +0200
committerFlorian Fischer <florian.fl.fischer@fau.de>2019-06-24 14:51:21 +0200
commit2d86e20f5a44aea66725686531463931f38aa2dc (patch)
treeb3e42e10e212aa61069775812cc821a2445a3b45 /src/allocators/glibc.py
parent366c9e27b13e976ce26ec6a97c6796eb1cdca887 (diff)
downloadallocbench-2d86e20f5a44aea66725686531463931f38aa2dc.tar.gz
allocbench-2d86e20f5a44aea66725686531463931f38aa2dc.zip
rework allocator definitions #2
bench.py no evals only if argument to -a is file path. Otherwise it will check if "arg".py is found in src/allocators/ then it imports it. Collection definitions must export a iterable member called allocators. Allocator definitions must export a member named "arg".
Diffstat (limited to 'src/allocators/glibc.py')
-rw-r--r--src/allocators/glibc.py21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/allocators/glibc.py b/src/allocators/glibc.py
index eff71dc..fb962f5 100644
--- a/src/allocators/glibc.py
+++ b/src/allocators/glibc.py
@@ -1,14 +1,15 @@
-import src.allocator
+from src.allocator import Allocator, Allocator_Sources, library_path
version = 2.29
-glibc_src = src.allocator.Allocator_Sources("glibc",
+glibc_src = Allocator_Sources("glibc",
retrieve_cmds=["git clone git://sourceware.org/git/glibc.git"],
prepare_cmds=["git checkout release/{}/master".format(version)],
reset_cmds=["git stash"])
-class Glibc (src.allocator.Allocator):
+
+class Glibc (Allocator):
"""Glibc definition for allocbench"""
def __init__(self, name, **kwargs):
@@ -23,7 +24,19 @@ class Glibc (src.allocator.Allocator):
"cd glibc-build; {srcdir}/configure --prefix={dir} " + configure_args,
"cd glibc-build; make",
"cd glibc-build; make install"]
+
kwargs["cmd_prefix"] = ("{dir}/lib/ld-linux-x86-64.so.2 --library-path {dir}/lib:"
- + src.allocator.library_path)
+ + library_path)
super().__init__(name, **kwargs)
+
+
+glibc = Glibc("glibc")
+
+glibc_notc = Glibc("glibc-noThreadCache", configure_args="--disable-experimental-malloc")
+
+glibc_nofs = Glibc("glibc-noFalsesharing",
+ patches=["{patchdir}/glibc_2.28_no_passive_falsesharing.patch"])
+
+glibc_nofs_fancy = Glibc("glibc-noFalsesharingClever",
+ patches=["{patchdir}/glibc_2.28_no_passive_falsesharing_fancy.patch"])