Skip to content

Commit

Permalink
Enable jemalloc profiling for debug builds [#CLICKHOUSE-2]
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-milovidov committed Nov 28, 2018
1 parent 42631ba commit 2cc82f5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion contrib/jemalloc-cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,11 @@ target_include_directories(jemalloc 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 -DJEMALLOC_PROF=1)

if (USE_UNWIND)
target_compile_definitions (jemalloc PRIVATE -DJEMALLOC_PROF_LIBUNWIND=1)
target_include_directories (jemalloc BEFORE PRIVATE ${UNWIND_INCLUDE_DIR})
target_link_libraries (jemalloc PRIVATE ${UNWIND_LIBRARY})
endif ()
endif ()

0 comments on commit 2cc82f5

Please sign in to comment.