diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2019-09-21 18:38:25 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2019-09-21 18:38:25 +0200 |
| commit | 213e5625a9aa677230f261fcee01086f9ee1f850 (patch) | |
| tree | 21a422f2152f0f1921b431199acb69cc7568e07b /src/allocators/jemalloc.py | |
| parent | 84eec0baba49bff0a5c2b64834bc2d75d687e7b5 (diff) | |
| download | allocbench-213e5625a9aa677230f261fcee01086f9ee1f850.tar.gz allocbench-213e5625a9aa677230f261fcee01086f9ee1f850.zip | |
replace AllocatorSources with Artifacts
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") |
