diff --git a/build_tools/build_detect_platform b/build_tools/build_detect_platform index d07e01fed2..3c8c054728 100755 --- a/build_tools/build_detect_platform +++ b/build_tools/build_detect_platform @@ -453,6 +453,6 @@ echo "ROCKSDB_PATCH=$ROCKSDB_PATCH" >> "$OUTPUT" echo "CLANG_SCAN_BUILD=$CLANG_SCAN_BUILD" >> "$OUTPUT" echo "CLANG_ANALYZER=$CLANG_ANALYZER" >> "$OUTPUT" echo "PROFILING_FLAGS=$PROFILING_FLAGS" >> "$OUTPUT" -if test -z "$JEMALLOC"; then +if test -n "$JEMALLOC"; then echo "JEMALLOC=1" >> "$OUTPUT" fi diff --git a/build_tools/fbcode_config.sh b/build_tools/fbcode_config.sh index 9e1c613ecd..404f6e9116 100644 --- a/build_tools/fbcode_config.sh +++ b/build_tools/fbcode_config.sh @@ -61,6 +61,7 @@ CFLAGS+=" -DGFLAGS=google" # location of jemalloc JEMALLOC_INCLUDE=" -I $JEMALLOC_BASE/include/" JEMALLOC_LIB=" $JEMALLOC_BASE/lib/libjemalloc.a" +JEMALLOC=1 if test -z $PIC_BUILD; then # location of numa diff --git a/build_tools/fbcode_config4.8.1.sh b/build_tools/fbcode_config4.8.1.sh index 71428d03b7..dbda429c5c 100644 --- a/build_tools/fbcode_config4.8.1.sh +++ b/build_tools/fbcode_config4.8.1.sh @@ -40,6 +40,7 @@ GFLAGS_LIBS=" $GFLAGS_BASE/lib/libgflags.a" # location of jemalloc JEMALLOC_INCLUDE=" -I $JEMALLOC_BASE/include" JEMALLOC_LIB="$JEMALLOC_BASE/lib/libjemalloc.a" +JEMALLOC=1 # location of numa NUMA_INCLUDE=" -I $NUMA_BASE/include/" diff --git a/db/db_impl.cc b/db/db_impl.cc index a27a8c06a1..ff4c44721a 100644 --- a/db/db_impl.cc +++ b/db/db_impl.cc @@ -536,6 +536,7 @@ void DBImpl::PrintStatistics() { } } +#ifndef ROCKSDB_LITE #ifdef ROCKSDB_JEMALLOC typedef struct { char* cur; @@ -566,6 +567,7 @@ static void DumpMallocStats(std::string* stats) { stats->append(buf.get()); #endif // ROCKSDB_JEMALLOC } +#endif // !ROCKSDB_LITE void DBImpl::MaybeDumpStats() { if (db_options_.stats_dump_period_sec == 0) return;