From 969fe0f6cd030bbd9dbfac0de1c0df0149486ffd Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Fri, 17 Jan 2020 03:06:15 +0100 Subject: use align_to_cl.so in front of TCMalloc --- src/allocators/tcmalloc.py | 8 +++++++- src/allocators/tcmallocs.py | 23 +++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 src/allocators/tcmallocs.py diff --git a/src/allocators/tcmalloc.py b/src/allocators/tcmalloc.py index f81f88b..ecd03e1 100644 --- a/src/allocators/tcmalloc.py +++ b/src/allocators/tcmalloc.py @@ -17,7 +17,7 @@ """TCMalloc definition for allocbench""" -from src.allocator import Allocator +from src.allocator import Allocator, BUILDDIR from src.artifact import GitArtifact @@ -42,3 +42,9 @@ tcmalloc_nofs = TCMalloc("TCMalloc-NoFalsesharing", patches=["{patchdir}/tcmalloc_2.7_no_active_falsesharing.patch"], version="gperftools-2.7", color="xkcd:navy") + +tcmalloc_align = TCMalloc("TCMalloc-Aligned", + version="gperftools-2.7", + color="xkcd:navy") + +tcmalloc_align.LD_PRELOAD = f"{BUILDDIR}/align_to_cl.so {tcmalloc_align.LD_PRELOAD}" diff --git a/src/allocators/tcmallocs.py b/src/allocators/tcmallocs.py new file mode 100644 index 0000000..fe8121f --- /dev/null +++ b/src/allocators/tcmallocs.py @@ -0,0 +1,23 @@ +# Copyright 2018-2019 Florian Fischer +# +# This file is part of allocbench. +# +# allocbench is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# allocbench is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with allocbench. If not, see . + +"""Collection containing all glibc variants""" + +from src.allocators.tcmalloc import tcmalloc, tcmalloc_nofs, tcmalloc_align + + +allocators = [tcmalloc, tcmalloc_nofs, tcmalloc_align] -- cgit v1.2.3