From c74e01bfa6c165793211ef591fff0a7a9dda5144 Mon Sep 17 00:00:00 2001 From: Giulio Eulisse <10544+ktf@users.noreply.github.com> Date: Tue, 12 Aug 2025 14:29:32 +0200 Subject: [PATCH] JEMalloc is now anymore actively maintained See also https://jasone.github.io/2025/06/12/jemalloc-postmortem for the details. --- CMakeLists.txt | 4 --- cmake/jemalloc.cmake | 65 ---------------------------------- src/common/base/CMakeLists.txt | 1 - 3 files changed, 70 deletions(-) delete mode 100644 cmake/jemalloc.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 7f26431..a9a87fd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -146,16 +146,12 @@ if (NOT spdlog_FOUND) ) endif() -include(jemalloc) - - find_package(UCX) # NOTE: Determines if we build StfSender, TfBuilder and TfScheduler # StfBuilder is always built message(STATUS "Boost version : ${Boost_VERSION}") message(STATUS "Boost include path : ${Boost_INCLUDE_DIRS}") -message(STATUS "jemalloc include : ${jemalloc_INCLUDE_DIRS}") message(STATUS "FairMQ version : ${FairMQ_VERSION}") message(STATUS "AliceO2 include path : ${AliceO2_INCLUDE_DIR}") message(STATUS "UCX include path : ${UCX_INCLUDE_DIR}") diff --git a/cmake/jemalloc.cmake b/cmake/jemalloc.cmake deleted file mode 100644 index b44f430..0000000 --- a/cmake/jemalloc.cmake +++ /dev/null @@ -1,65 +0,0 @@ -# Copyright 2019-2022 CERN and copyright holders of ALICE O2. -# See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. -# All rights not expressly granted are reserved. -# -# This software is distributed under the terms of the GNU General Public -# License v3 (GPL Version 3), copied verbatim in the file "COPYING". -# -# In applying this license CERN does not waive the privileges and immunities -# granted to it by virtue of its status as an Intergovernmental Organization -# or submit itself to any jurisdiction. - -## \author Gvozden Nešković, Frankfurt Institute for Advanced Studies and Goethe University Frankfurt -## \brief build jemalloc dependency - -#--- EXTERNAL PROJECTS -------------------------------------------------------------- -include(ExternalProject) - -ExternalProject_Add(jemalloc - GIT_REPOSITORY "https://github.com/jemalloc/jemalloc.git" - GIT_TAG "5.3.0" - - GIT_SHALLOW TRUE - GIT_PROGRESS TRUE - - UPDATE_COMMAND "" - PATCH_COMMAND "" - - SOURCE_DIR "${CMAKE_BINARY_DIR}/3rdparty/jemalloc" - - BUILD_IN_SOURCE 1 - BUILD_BYPRODUCTS ${jemalloc_STATIC} ${jemalloc_STATIC_PIC} - - CONFIGURE_COMMAND ./autogen.sh - COMMAND ./configure --disable-shared - --disable-doc - --prefix=${CMAKE_BINARY_DIR}/jemalloc - --with-malloc-conf=abort_conf:true,background_thread:true,metadata_thp:auto,dirty_decay_ms:300000,muzzy_decay_ms:300000 - "CFLAGS=${CMAKE_C_FLAGS} -Wno-missing-attributes" - - BUILD_COMMAND ${MAKE} - # TODO: -j1 is a workaround for GH-39628: [C++] Use -j1 for cmake >= 3.28 - # Similar solution in Apache Arrow: https://github.com/apache/arrow/pull/39629 - INSTALL_COMMAND make install -j1 - - LOG_DOWNLOAD True - LOG_UPDATE True - LOG_INSTALL True - LOG_OUTPUT_ON_FAILURE True -) - -set(jemalloc_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR}/jemalloc/include) - -add_library(jemalloc_STATIC STATIC IMPORTED) -set_property(TARGET jemalloc_STATIC PROPERTY IMPORTED_LOCATION ${CMAKE_BINARY_DIR}/jemalloc/lib/libjemalloc.a) -add_dependencies(jemalloc_STATIC jemalloc) - -add_library(jemalloc_STATIC_PIC STATIC IMPORTED) -set_property(TARGET jemalloc_STATIC_PIC PROPERTY IMPORTED_LOCATION ${CMAKE_BINARY_DIR}/jemalloc/lib/libjemalloc_pic.a) -add_dependencies(jemalloc_STATIC_PIC jemalloc) - -if (!APPLE) - link_libraries(-Wl,--no-as-needed) -endif(!APPLE) - -link_libraries(dl ${jemalloc_STATIC_PIC}) diff --git a/src/common/base/CMakeLists.txt b/src/common/base/CMakeLists.txt index 3c73b19..4ebedcf 100644 --- a/src/common/base/CMakeLists.txt +++ b/src/common/base/CMakeLists.txt @@ -28,7 +28,6 @@ target_include_directories(base target_link_libraries(base PUBLIC - jemalloc_STATIC spdlog::spdlog Boost::filesystem AliceO2::InfoLogger