From 3104e55f298c9af087a0d07b99627aa476db6e27 Mon Sep 17 00:00:00 2001 From: zaidoon Date: Tue, 27 Feb 2024 15:07:00 -0800 Subject: [PATCH] update DB::DumpSupportInfo to log whether jemalloc is supported or not (#12386) Summary: Pull Request resolved: https://github.com/facebook/rocksdb/pull/12386 Reviewed By: cbi42 Differential Revision: D54231896 Pulled By: ajkr fbshipit-source-id: 6b3357b2e97d3599955e303810088bb5d5896199 --- db/db_impl/db_impl.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/db/db_impl/db_impl.cc b/db/db_impl/db_impl.cc index b0465815e9..ab83e86d70 100644 --- a/db/db_impl/db_impl.cc +++ b/db/db_impl/db_impl.cc @@ -71,6 +71,9 @@ #include "options/cf_options.h" #include "options/options_helper.h" #include "options/options_parser.h" +#ifdef ROCKSDB_JEMALLOC +#include "port/jemalloc_helper.h" +#endif #include "port/port.h" #include "rocksdb/cache.h" #include "rocksdb/compaction_filter.h" @@ -148,6 +151,12 @@ void DumpSupportInfo(Logger* logger) { crc32c::IsFastCrc32Supported().c_str()); ROCKS_LOG_HEADER(logger, "DMutex implementation: %s", DMutex::kName()); + + bool jemalloc_supported = false; +#ifdef ROCKSDB_JEMALLOC + jemalloc_supported = HasJemalloc(); +#endif + ROCKS_LOG_HEADER(logger, "Jemalloc supported: %d", jemalloc_supported); } } // namespace