From 91979cdd1758122fef2f93d746f103a9e2889fd7 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Mon, 18 Apr 2022 21:37:49 +0300 Subject: [PATCH] jemalloc: enable logging in debug build Signed-off-by: Azat Khuzhin --- contrib/jemalloc-cmake/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/contrib/jemalloc-cmake/CMakeLists.txt b/contrib/jemalloc-cmake/CMakeLists.txt index 41b042df95b..9896ac8b9b8 100644 --- a/contrib/jemalloc-cmake/CMakeLists.txt +++ b/contrib/jemalloc-cmake/CMakeLists.txt @@ -155,7 +155,12 @@ target_include_directories(_jemalloc SYSTEM PRIVATE target_compile_definitions(_jemalloc PRIVATE -DJEMALLOC_NO_PRIVATE_NAMESPACE) if (CMAKE_BUILD_TYPE_UC STREQUAL "DEBUG") - target_compile_definitions(_jemalloc PRIVATE -DJEMALLOC_DEBUG=1) + target_compile_definitions(_jemalloc PRIVATE + -DJEMALLOC_DEBUG=1 + # Usage examples: + # - MALLOC_CONF=log:. + # - MALLOC_CONF='log:core.malloc.exit|core.sallocx.entry|core.sdallocx.entry' + -DJEMALLOC_LOG=1) endif () target_compile_definitions(_jemalloc PRIVATE -DJEMALLOC_PROF=1)