From: Owen Synge Date: Wed, 24 Jun 2015 18:16:54 +0000 (+0200) Subject: ceph.spec.in: add a bcond_with for jemalloc X-Git-Tag: rrygrvmctuzz-build-me~46 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=95a72bd925379792f1488209967222c4cafde166;p=ceph.git ceph.spec.in: add a bcond_with for jemalloc jemalloc like tcmalloc is a high performance replacement for glibc malloc. Which is better for ceph can only be told via benchmarks and testing. This patch makes it easer to test this as an rpm install. Signed-off-by: Owen Synge (cherry picked from commit 7b24b9bfc0a49c9eac6f07eee4d5a52eceddbb34) Conflicts: ceph.spec.in _udevrulesdir --- diff --git a/ceph.spec.in b/ceph.spec.in index bab861a784232..3f013b6cc4556 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -19,6 +19,8 @@ %bcond_without cephfs_java %bcond_with tests %bcond_without tcmalloc +%bcond_with jemalloc + %bcond_without libs_compat %bcond_with librocksdb @@ -83,6 +85,9 @@ BuildRequires: systemd %if 0%{with cephfs_java} BuildRequires: sharutils %endif +%if 0%{with jemalloc} +BuildRequires: jemalloc-devel +%endif BuildRequires: gcc-c++ BuildRequires: boost-devel BuildRequires: cryptsetup @@ -518,7 +523,14 @@ export RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed -e 's/i386/i486/'` %endif $MY_CONF_OPT \ %{?_with_ocf} \ - %{?_with_tcmalloc} \ +%if 0%{with tcmalloc} + --with-tcmalloc \ + --without-jemalloc \ +%endif +%if 0%{with jemalloc} + --without-tcmalloc \ + --with-jemalloc \ +%endif CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" # fix bug in specific version of libedit-devel