diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2019-09-29 15:35:02 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2019-09-29 15:35:02 +0200 |
| commit | 059d263a6b944c4cfc5a5a0f2716e6a85116cfc1 (patch) | |
| tree | 8169cefa09e08dab87f2f94967dc5a80ee2b425a /src/allocators/jemalloc.py | |
| parent | e9f41e9e3ef8f6d35dda10c6c58d77b52d577e8a (diff) | |
| parent | 3f43d0f464b8da5829ff652a3208720c74d1882b (diff) | |
| download | allocbench-059d263a6b944c4cfc5a5a0f2716e6a85116cfc1.tar.gz allocbench-059d263a6b944c4cfc5a5a0f2716e6a85116cfc1.zip | |
Merge branch 'artifact'
Diffstat (limited to 'src/allocators/jemalloc.py')
| -rw-r--r-- | src/allocators/jemalloc.py | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/src/allocators/jemalloc.py b/src/allocators/jemalloc.py index 4484362..18e3055 100644 --- a/src/allocators/jemalloc.py +++ b/src/allocators/jemalloc.py @@ -17,26 +17,24 @@ """jemalloc definition for allocbench""" -from src.allocator import Allocator, AllocatorSources - -VERSION = "5.1.0" - -sources = AllocatorSources("jemalloc", - retrieve_cmds=["git clone https://github.com/jemalloc/jemalloc.git"], - prepare_cmds=[f"git checkout {VERSION}", "./autogen.sh"]) +from src.allocator import Allocator +from src.artifact import GitArtifact class Jemalloc(Allocator): """jemalloc allocator""" - def __init__(self, name, **kwargs): - kwargs["sources"] = sources - kwargs["LD_PRELOAD"] = "{srcdir}/lib/libjemalloc.so" - kwargs["build_cmds"] = ["cd {srcdir}; ./configure --prefix={dir}", - "cd {srcdir}; make -j4", - "mkdir -p {dir}"] + sources = GitArtifact("jemalloc", "https://github.com/jemalloc/jemalloc.git") + + def __init__(self, name, **kwargs): + self.LD_PRELOAD = "{dir}/libjemalloc.so" + self.prepare_cmds = ["./autogen.sh"] + self.build_cmds = ["cd {srcdir}; ./configure --prefix={dir}", + "cd {srcdir}; make -j4", + "mkdir -p {dir}", + "ln -f -s {srcdir}/lib/libjemalloc.so {dir}/libjemalloc.so"] super().__init__(name, **kwargs) -jemalloc = Jemalloc("jemalloc", color="xkcd:yellow") +jemalloc = Jemalloc("jemalloc", version="5.1.0", color="xkcd:yellow") |
