Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no longer eagerly use tcmalloc if it's found #1363

Merged
merged 1 commit into from
Jul 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,10 @@ endif()

message( STATUS "Using '${EOSIO_ROOT_KEY}' as public key for 'eosio' account" )

find_package( Gperftools QUIET )
if( GPERFTOOLS_FOUND )
message( STATUS "Found gperftools; compiling Leap with TCMalloc")
option(ENABLE_TCMALLOC "use tcmalloc (requires gperftools)" OFF)
if( ENABLE_TCMALLOC )
find_package( Gperftools REQUIRED )
message( STATUS "Compiling Leap with TCMalloc")
#if doing this by the book, simply link_libraries( ${GPERFTOOLS_TCMALLOC} ) here. That will
#give the performance benefits of tcmalloc but since it won't be linked last
#the heap profiler & checker may not be accurate. This here is rather undocumented behavior
Expand Down
6 changes: 0 additions & 6 deletions CMakeModules/EosioTester.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ if (LLVM_DIR STREQUAL "" OR NOT LLVM_DIR)
set(LLVM_DIR @LLVM_DIR@)
endif()

find_package( Gperftools QUIET )
if( GPERFTOOLS_FOUND )
message( STATUS "Found gperftools; compiling tests with TCMalloc")
list( APPEND PLATFORM_SPECIFIC_LIBS tcmalloc )
endif()

if(NOT "@LLVM_FOUND@" STREQUAL "")
find_package(LLVM @LLVM_VERSION@ EXACT REQUIRED CONFIG)
llvm_map_components_to_libnames(LLVM_LIBS support core passes mcjit native DebugInfoDWARF orcjit)
Expand Down
6 changes: 0 additions & 6 deletions CMakeModules/EosioTesterBuild.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@ if (LLVM_DIR STREQUAL "" OR NOT LLVM_DIR)
set(LLVM_DIR @LLVM_DIR@)
endif()

find_package( Gperftools QUIET )
if( GPERFTOOLS_FOUND )
message( STATUS "Found gperftools; compiling tests with TCMalloc")
list( APPEND PLATFORM_SPECIFIC_LIBS tcmalloc )
endif()

if(NOT "@LLVM_FOUND@" STREQUAL "")
find_package(LLVM @LLVM_VERSION@ EXACT REQUIRED CONFIG)
llvm_map_components_to_libnames(LLVM_LIBS support core passes mcjit native DebugInfoDWARF orcjit)
Expand Down