From 7ffa9b4319363d1b424246e3a0ffc972d3158025 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Mon, 24 Jun 2019 19:26:10 +0200 Subject: add tbbmalloc definition --- src/allocators/all.py | 3 ++- src/allocators/tbbmalloc.py | 24 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 src/allocators/tbbmalloc.py diff --git a/src/allocators/all.py b/src/allocators/all.py index ccf48b8..9afacf7 100644 --- a/src/allocators/all.py +++ b/src/allocators/all.py @@ -9,7 +9,8 @@ from src.allocators.mesh import mesh from src.allocators.scalloc import scalloc from src.allocators.supermalloc import supermalloc from src.allocators.llalloc import llalloc +from src.allocators.tbbmalloc import tbbmalloc allocators = [*src.allocators.glibcs.allocators, tcmalloc, tcmalloc_nofs, - jemalloc, hoard, mesh, supermalloc, scalloc, llalloc] + jemalloc, hoard, mesh, supermalloc, scalloc, llalloc, tbbmalloc] diff --git a/src/allocators/tbbmalloc.py b/src/allocators/tbbmalloc.py new file mode 100644 index 0000000..420803b --- /dev/null +++ b/src/allocators/tbbmalloc.py @@ -0,0 +1,24 @@ +import src.allocator + +version = "2019_U8" + +source = src.allocator.Allocator_Sources("tbb", + ["git clone https://github.com/intel/tbb.git"], + ["git checkout {}".format(version)], + ["git stash"]) + + +class TBBMalloc (src.allocator.Allocator): + """TCMalloc definition for allocbench""" + def __init__(self, name, **kwargs): + + kwargs["sources"] = source + kwargs["LD_PRELOAD"] = "{dir}/libtbbmalloc.so" + kwargs["build_cmds"] = ["cd {srcdir}; make tbbmalloc -j4", + "mkdir -p {dir}", + 'ln -f -s $(find {srcdir} -executable -name "*libtbbmalloc.so*") {dir}/libtbbmalloc.so'] + + super().__init__(name, **kwargs) + + +tbbmalloc = TBBMalloc("tbbmalloc") -- cgit v1.2.3