aboutsummaryrefslogtreecommitdiff
path: root/src/allocators/tcmalloc.py
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2019-09-29 15:35:02 +0200
committerFlorian Fischer <florian.fl.fischer@fau.de>2019-09-29 15:35:02 +0200
commit059d263a6b944c4cfc5a5a0f2716e6a85116cfc1 (patch)
tree8169cefa09e08dab87f2f94967dc5a80ee2b425a /src/allocators/tcmalloc.py
parente9f41e9e3ef8f6d35dda10c6c58d77b52d577e8a (diff)
parent3f43d0f464b8da5829ff652a3208720c74d1882b (diff)
downloadallocbench-059d263a6b944c4cfc5a5a0f2716e6a85116cfc1.tar.gz
allocbench-059d263a6b944c4cfc5a5a0f2716e6a85116cfc1.zip
Merge branch 'artifact'
Diffstat (limited to 'src/allocators/tcmalloc.py')
-rw-r--r--src/allocators/tcmalloc.py24
1 files changed, 11 insertions, 13 deletions
diff --git a/src/allocators/tcmalloc.py b/src/allocators/tcmalloc.py
index 916da88..f81f88b 100644
--- a/src/allocators/tcmalloc.py
+++ b/src/allocators/tcmalloc.py
@@ -17,30 +17,28 @@
"""TCMalloc definition for allocbench"""
-from src.allocator import Allocator, AllocatorSources
-
-VERSION = 2.7
-
-TCMALLOC_SRC = AllocatorSources("tcmalloc",
- ["git clone https://github.com/gperftools/gperftools.git tcmalloc"],
- [f"git checkout gperftools-{VERSION}", "./autogen.sh"],
- ["git reset --hard"])
+from src.allocator import Allocator
+from src.artifact import GitArtifact
class TCMalloc(Allocator):
"""TCMalloc allocator"""
+
+ sources = GitArtifact("tcmalloc", "https://github.com/gperftools/gperftools.git")
+
def __init__(self, name, **kwargs):
- kwargs["sources"] = TCMALLOC_SRC
- kwargs["LD_PRELOAD"] = "{dir}/lib/libtcmalloc.so"
- kwargs["build_cmds"] = ["cd {srcdir}; ./configure --prefix={dir}",
- "cd {srcdir}; make install -j4"]
+ self.LD_PRELOAD = "{dir}/lib/libtcmalloc.so"
+ self.prepare_cmds = ["./autogen.sh"]
+ self.build_cmds = ["cd {srcdir}; ./configure --prefix={dir}",
+ "cd {srcdir}; make install -j4"]
super().__init__(name, **kwargs)
-tcmalloc = TCMalloc("TCMalloc", color="xkcd:blue")
+tcmalloc = TCMalloc("TCMalloc", color="xkcd:blue", version="gperftools-2.7")
tcmalloc_nofs = TCMalloc("TCMalloc-NoFalsesharing",
patches=["{patchdir}/tcmalloc_2.7_no_active_falsesharing.patch"],
+ version="gperftools-2.7",
color="xkcd:navy")