diff options
| author | Richard Wareing <rwareing@fb.com> | 2015-07-14 12:54:38 -0700 |
|---|---|---|
| committer | Kevin Vigor <kvigor@fb.com> | 2017-03-06 19:34:03 -0500 |
| commit | 259d65ffb7296415cb9110ba1877d0378265bf52 (patch) | |
| tree | 26423ddca1ec20f1b7bf0f56475971223f163ba6 /configure.ac | |
| parent | 4e5e8f4d9b3e8c0a7364a1006972857062ac0b90 (diff) | |
Add jemalloc support to GlusterFS v3.6.3
Summary:
- Adds a build time option to add je-malloc support to GlusterFS v3.6.3
(--with-jemalloc)
- glusterfs.spec.in updated to install it
- Beyond a performance increase on calloc/mallocing (2-3x) I'm hoping we
will avoid the deadlock issue we are seeing with glibc 2.12
Test Plan:
- Built rc, deployed to gfsinstabu
- Ran load test
Reviewers: dph, moox, sshreyas
Reviewed By: sshreyas
Subscribers: storage@
FB-commit-id: e02f16b
Change-Id: I911ab5abf607707ee57693a8eacc0a5899db1a1b
Signed-off-by: Kevin Vigor <kvigor@fb.com>
Reviewed-on: https://review.gluster.org/16860
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Shreyas Siravara <sshreyas@fb.com>
Diffstat (limited to 'configure.ac')
| -rw-r--r-- | configure.ac | 64 |
1 files changed, 63 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 4c2bb32fe23..b045333e825 100644 --- a/configure.ac +++ b/configure.ac @@ -363,6 +363,10 @@ AC_ARG_WITH([ocf], ) AC_SUBST(OCF_SUBDIR) +AC_ARG_WITH(asan,--with-asan,,with_asan="no") +AC_ARG_WITH(tsan,--with-tsan,,with_tsan="no") +AC_ARG_WITH(jemalloc,--with-jemalloc,,with_jemalloc="no") + # LEX needs a check AC_PROG_LEX if test "x${LEX}" != "xflex" -a "x${FLEX}" != "xlex"; then @@ -922,8 +926,63 @@ AC_SUBST(GF_DISTRIBUTION) GF_HOST_OS="" GF_LDFLAGS="-rdynamic" -TESTER_CFLAGS="" +BUILD_ASAN=no +if test "x$with_asan" = "xyes"; then + echo -n "checking for address sanitizer (ASAN) support... " + AC_LANG_CONFTEST(AC_LANG_PROGRAM()) + $CC conftest.c $CFLAGS -fsanitize=address -o conftest + ret=$? + rm -f conftest.o conftest + if test $ret -eq 0 ; then + echo "yes" + BUILD_ASAN=yes + GF_CFLAGS="$GF_CFLAGS -DASAN -fsanitize=address -O0 -ggdb" + GF_LDFLAGS="-gdb -static-libasan $GF_LDFLAGS" + else + echo "no" + echo "ERROR: ASAN not supported by compiler ($CC)" + exit 1 + fi +fi +BUILD_TSAN=no +if test "x$with_tsan" = "xyes"; then + echo -n "checking for thread sanitizer (TSAN) support... " + AC_LANG_CONFTEST([AC_LANG_PROGRAM()]) + $CC conftest.c $CFLAGS -fsanitize=address -o conftest > /dev/null 2> /dev/null + ret=$? + rm -f conftest.o conftest + if test $ret -eq 0 ; then + echo "yes" + BUILD_TSAN=yes + GF_CFLAGS="$GF_CFLAGS -fsanitize=thread -O0 -ggdb -fPIC -pie" + GF_LDFLAGS="-gdb -static-libtsan $GF_LDFLAGS" + else + echo "no" + echo "ERROR: TSAN not supported by compiler ($CC)" + exit 1 + fi +fi + +BUILD_JEMALLOC=no +if test "x$with_jemalloc" = "xyes"; then + echo -n "checking for jemalloc support... " + AC_LANG_CONFTEST([AC_LANG_PROGRAM()]) + $CC conftest.c $CFLAGS -ljemalloc -o conftest > /dev/null 2> /dev/null + ret=$? + rm -f conftest.o conftest + if test $ret -eq 0 ; then + echo "yes" + BUILD_JEMALLOC=yes + GF_LDFLAGS="-ljemalloc $GF_LDFLAGS" + else + echo "no" + echo "ERROR: jemalloc linking error" + exit 1 + fi +fi + +TESTER_CFLAGS="" dnl include tirpc for FB builds if test "x$BUILD_FBEXTRAS" = "xyes"; then TIRPC_CFLAGS="-I/usr/include/tirpc" @@ -1393,4 +1452,7 @@ echo "POSIX ACLs : $BUILD_POSIX_ACLS" echo "Data Classification : $BUILD_GFDB" echo "firewalld-config : $BUILD_FIREWALLD" echo "Experimental xlators : $BUILD_EXPERIMENTAL" +echo "ASAN enabled : $BUILD_ASAN" +echo "TSAN enabled : $BUILD_TSAN" +echo "jemalloc enabled : $BUILD_JEMALLOC" echo |
