Not enable jemalloc status printing if USE_CLANG=1

Summary: Warning is printed out with USE_CLANG=1 when including jemalloc.h. Disable it in that case.

Test Plan: Run db_bench with USE_CLANG=1 and not. Make sure they can all build and jemalloc status is printed out in the case where USE_CLANG is not set.

Reviewers: andrewkr, IslamAbdelRahman

Reviewed By: IslamAbdelRahman

Subscribers: leveldb, andrewkr, dhruba

Differential Revision: https://reviews.facebook.net/D57399
main
sdong 9 years ago
parent 029022b0f1
commit 992a8f83b7
  1. 2
      build_tools/fbcode_config.sh
  2. 2
      build_tools/fbcode_config4.8.1.sh
  3. 2
      db/db_impl.cc

@ -61,7 +61,6 @@ CFLAGS+=" -DGFLAGS=google"
# location of jemalloc # location of jemalloc
JEMALLOC_INCLUDE=" -I $JEMALLOC_BASE/include/" JEMALLOC_INCLUDE=" -I $JEMALLOC_BASE/include/"
JEMALLOC_LIB=" $JEMALLOC_BASE/lib/libjemalloc.a" JEMALLOC_LIB=" $JEMALLOC_BASE/lib/libjemalloc.a"
JEMALLOC=1
if test -z $PIC_BUILD; then if test -z $PIC_BUILD; then
# location of numa # location of numa
@ -98,6 +97,7 @@ if [ -z "$USE_CLANG" ]; then
CFLAGS+=" -B$BINUTILS/gold" CFLAGS+=" -B$BINUTILS/gold"
CFLAGS+=" -isystem $GLIBC_INCLUDE" CFLAGS+=" -isystem $GLIBC_INCLUDE"
CFLAGS+=" -isystem $LIBGCC_INCLUDE" CFLAGS+=" -isystem $LIBGCC_INCLUDE"
JEMALLOC=1
else else
# clang # clang
CLANG_INCLUDE="$CLANG_LIB/clang/*/include" CLANG_INCLUDE="$CLANG_LIB/clang/*/include"

@ -40,7 +40,6 @@ GFLAGS_LIBS=" $GFLAGS_BASE/lib/libgflags.a"
# location of jemalloc # location of jemalloc
JEMALLOC_INCLUDE=" -I $JEMALLOC_BASE/include" JEMALLOC_INCLUDE=" -I $JEMALLOC_BASE/include"
JEMALLOC_LIB="$JEMALLOC_BASE/lib/libjemalloc.a" JEMALLOC_LIB="$JEMALLOC_BASE/lib/libjemalloc.a"
JEMALLOC=1
# location of numa # location of numa
NUMA_INCLUDE=" -I $NUMA_BASE/include/" NUMA_INCLUDE=" -I $NUMA_BASE/include/"
@ -67,6 +66,7 @@ if [ -z "$USE_CLANG" ]; then
CFLAGS="-B$BINUTILS/gold -m64 -mtune=generic" CFLAGS="-B$BINUTILS/gold -m64 -mtune=generic"
CFLAGS+=" -isystem $GLIBC_INCLUDE" CFLAGS+=" -isystem $GLIBC_INCLUDE"
CFLAGS+=" -isystem $LIBGCC_INCLUDE" CFLAGS+=" -isystem $LIBGCC_INCLUDE"
JEMALLOC=1
else else
# clang # clang
CLANG_BIN="$CLANG_BASE/bin" CLANG_BIN="$CLANG_BASE/bin"

@ -551,7 +551,7 @@ static void GetJemallocStatus(void* mstat_arg, const char* status) {
return; return;
} }
snprintf(mstat->cur, buf_size, status); snprintf(mstat->cur, buf_size, "%s", status);
mstat->cur += status_len; mstat->cur += status_len;
} }
#endif // ROCKSDB_JEMALLOC #endif // ROCKSDB_JEMALLOC

Loading…
Cancel
Save