From 2d86e20f5a44aea66725686531463931f38aa2dc Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Mon, 24 Jun 2019 14:51:21 +0200 Subject: 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". --- src/allocators/tcmalloc.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/allocators/tcmalloc.py') diff --git a/src/allocators/tcmalloc.py b/src/allocators/tcmalloc.py index 4650772..b6da1e7 100644 --- a/src/allocators/tcmalloc.py +++ b/src/allocators/tcmalloc.py @@ -1,13 +1,13 @@ import src.allocator - version = 2.7 -tcmalloc_src = src.allocator.Allocator_Sources("gperftools", - ["git clone https://github.com/gperftools/gperftools.git"], +tcmalloc_src = src.allocator.Allocator_Sources("tcmalloc", + ["git clone https://github.com/gperftools/gperftools.git tcmalloc"], ["git checkout gperftools-{}".format(version), "./autogen.sh"], ["git stash"]) + class TCMalloc (src.allocator.Allocator): """TCMalloc definition for allocbench""" def __init__(self, name, **kwargs): @@ -18,3 +18,9 @@ class TCMalloc (src.allocator.Allocator): "cd {srcdir}; make install -j4"] super().__init__(name, **kwargs) + + +tcmalloc = TCMalloc("TCMalloc") + +tcmalloc_nofs = TCMalloc("TCMalloc-NoFalsesharing", + patches=["{patchdir}/tcmalloc_2.7_no_active_falsesharing.patch"]) -- cgit v1.2.3