This is an automated email from the ASF dual-hosted git repository.
hulk pushed a commit to branch unstable
in repository https://gitbox.apache.org/repos/asf/kvrocks.git
The following commit(s) were added to refs/heads/unstable by this push:
new db08209e0 build(jemalloc): enable the profiling option when compiling
the jemalloc (#3001)
db08209e0 is described below
commit db08209e09d7b2a3acdcb98802b927a569ea1768
Author: hulk <[email protected]>
AuthorDate: Sat May 31 17:56:48 2025 +0800
build(jemalloc): enable the profiling option when compiling the jemalloc
(#3001)
---
cmake/jemalloc.cmake | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/cmake/jemalloc.cmake b/cmake/jemalloc.cmake
index 5c69cfa70..3230b6e60 100644
--- a/cmake/jemalloc.cmake
+++ b/cmake/jemalloc.cmake
@@ -23,6 +23,12 @@ else()
set(DISABLE_CACHE_OBLIVIOUS "--disable-cache-oblivious")
endif()
+if (NOT DISABLE_JEMALLOC_PROFILING)
+ set(ENABLE_JEMALLOC_PROFILING "--enable-prof")
+else()
+ set(ENABLE_JEMALLOC_PROFILING "")
+endif()
+
include(cmake/utils.cmake)
FetchContent_DeclareGitHubWithMirror(jemalloc
@@ -38,7 +44,8 @@ if(NOT jemalloc_POPULATED)
WORKING_DIRECTORY ${jemalloc_SOURCE_DIR}
)
execute_process(COMMAND ${jemalloc_SOURCE_DIR}/configure
CC=${CMAKE_C_COMPILER} -C --enable-autogen
- --disable-shared --disable-libdl
${DISABLE_CACHE_OBLIVIOUS} --with-jemalloc-prefix=""
+ --disable-shared --disable-libdl
${DISABLE_CACHE_OBLIVIOUS} ${ENABLE_JEMALLOC_PROFILING}
+ --with-jemalloc-prefix=""
WORKING_DIRECTORY ${jemalloc_BINARY_DIR}
)
add_custom_target(make_jemalloc