diff --git a/CMakeLists.txt b/CMakeLists.txt index 09f68e7b234..12d5ab87368 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -47,7 +47,6 @@ option(ENABLE_POSIX_CAP ON ) option(ENABLE_PROFILER "Use gperftools profiler (default OFF)") -option(ENABLE_TCMALLOC "Use TCMalloc (default OFF)") set(ENABLE_TPROXY "AUTO" CACHE diff --git a/build/jemalloc.m4 b/build/jemalloc.m4 index 7acf1ebec51..ca788987ac6 100644 --- a/build/jemalloc.m4 +++ b/build/jemalloc.m4 @@ -23,9 +23,6 @@ has_jemalloc=no AC_ARG_WITH([jemalloc], [AS_HELP_STRING([--with-jemalloc=DIR],[use a specific jemalloc library])], [ if test "$withval" != "no"; then - if test "x${has_tcmalloc}" = "xyes"; then - AC_MSG_ERROR([Cannot compile with both jemalloc and tcmalloc]) - fi if test "x${has_mimalloc}" = "xyes"; then AC_MSG_ERROR([Cannot compile with both jemalloc and mimalloc]) fi diff --git a/build/mimalloc.m4 b/build/mimalloc.m4 index f291d04afe8..7d59f0728cd 100644 --- a/build/mimalloc.m4 +++ b/build/mimalloc.m4 @@ -23,9 +23,6 @@ has_mimalloc=no AC_ARG_WITH([mimalloc], [AS_HELP_STRING([--with-mimalloc=DIR],[use a specific mimalloc library])], [ if test "$withval" != "no"; then - if test "x${has_tcmalloc}" = "xyes"; then - AC_MSG_ERROR([Cannot compile with both mimalloc and tcmalloc]) - fi if test "x${has_jemalloc}" = "xyes"; then AC_MSG_ERROR([Cannot compile with both mimalloc and jemalloc]) fi diff --git a/build/tcmalloc.m4 b/build/tcmalloc.m4 deleted file mode 100644 index d8027ad7aeb..00000000000 --- a/build/tcmalloc.m4 +++ /dev/null @@ -1,56 +0,0 @@ -dnl -------------------------------------------------------- -*- autoconf -*- -dnl Licensed to the Apache Software Foundation (ASF) under one or more -dnl contributor license agreements. See the NOTICE file distributed with -dnl this work for additional information regarding copyright ownership. -dnl The ASF licenses this file to You under the Apache License, Version 2.0 -dnl (the "License"); you may not use this file except in compliance with -dnl the License. You may obtain a copy of the License at -dnl -dnl http://www.apache.org/licenses/LICENSE-2.0 -dnl -dnl Unless required by applicable law or agreed to in writing, software -dnl distributed under the License is distributed on an "AS IS" BASIS, -dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -dnl See the License for the specific language governing permissions and -dnl limitations under the License. - -dnl -dnl tcmalloc.m4: Trafficserver's tcmalloc autoconf macros -dnl - -dnl This is kinda fugly, but need a way to both specify a directory and which -dnl of the many tcmalloc libraries to use ... -AC_DEFUN([TS_CHECK_TCMALLOC], [ -AC_ARG_WITH([tcmalloc-lib], - [AS_HELP_STRING([--with-tcmalloc-lib],[specify the tcmalloc library to use [default=tcmalloc]])], - [ - with_tcmalloc_lib="$withval" - ],[ - with_tcmalloc_lib="tcmalloc" - ] -) - -has_tcmalloc=0 -AC_ARG_WITH([tcmalloc], [AS_HELP_STRING([--with-tcmalloc=DIR],[use the tcmalloc library])], -[ - if test "$withval" != "no"; then - if test "x${has_jemalloc}" = "xyes"; then - AC_MSG_ERROR([Cannot compile with both tcmalloc and jemalloc]) - fi - if test "x${has_mimalloc}" = "xyes"; then - AC_MSG_ERROR([Cannot compile with both tcmalloc and mimalloc]) - fi - tcmalloc_have_libs=0 - if test "x$withval" != "xyes" && test "x$withval" != "x"; then - tcmalloc_ldflags="$withval/lib" - TS_ADDTO(LDFLAGS, [-L${tcmalloc_ldflags}]) - TS_ADDTO_RPATH(${tcmalloc_ldflags}) - fi - AC_SEARCH_LIBS([tc_cfree], ${with_tcmalloc_lib}, [tcmalloc_have_lib=1]) - if test "$tcmalloc_have_lib" != "0"; then - has_tcmalloc=1 - fi - fi -]) -AC_SUBST(has_tcmalloc) -]) diff --git a/cmake/FindTCMalloc.cmake b/cmake/FindTCMalloc.cmake deleted file mode 100644 index 6b60072fc03..00000000000 --- a/cmake/FindTCMalloc.cmake +++ /dev/null @@ -1,41 +0,0 @@ -####################### -# -# Licensed to the Apache Software Foundation (ASF) under one or more contributor license -# agreements. See the NOTICE file distributed with this work for additional information regarding -# copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software distributed under the License -# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express -# or implied. See the License for the specific language governing permissions and limitations under -# the License. -# -####################### - -# FindTCMalloc.cmake -# -# This will define the following variables -# -# TCMalloc_FOUND -# TCMalloc_LIBRARY -# -# and the following imported targets -# -# TCMalloc::TCMalloc -# - -# libtcmalloc.so symlink not created on OpenSUSE Leap 15.4 -find_library(TCMalloc_LIBRARY NAMES libtcmalloc libtcmalloc.so.4) - -mark_as_advanced(TCMalloc_FOUND TCMalloc_LIBRARY) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(TCMalloc REQUIRED_VARS TCMalloc_LIBRARY) - -if(TCMalloc_FOUND AND NOT TARGET TCMalloc::TCMalloc) - add_library(gperftools::TCMalloc INTERFACE IMPORTED) - target_link_libraries(gperftools::TCMalloc INTERFACE "${TCMalloc_LIBRARY}") -endif() diff --git a/cmake/FindTSMallocReplacement.cmake b/cmake/FindTSMallocReplacement.cmake index 6ca2abfd5fe..110a4f684d5 100644 --- a/cmake/FindTSMallocReplacement.cmake +++ b/cmake/FindTSMallocReplacement.cmake @@ -23,7 +23,6 @@ # TS_HAS_MALLOC_REPLACEMENT # TS_HAS_JEMALLOC # TS_HAS_MIMALLOC -# TS_HAS_TCMALLOC # # and the following imported targets # @@ -32,10 +31,6 @@ if(ENABLE_JEMALLOC AND ENABLE_MIMALLOC) message(FATAL_ERROR "Cannot build with both jemalloc and mimalloc.") -elseif(ENABLE_JEMALLOC AND ENABLE_TCMALLOC) - message(FATAL_ERROR "Cannot build with both jemalloc and TCMalloc.") -elseif(ENABLE_MIMALLOC AND ENABLE_TCMALLOC) - message(FATAL_ERROR "Cannot build with both mimalloc and TCMalloc.") endif() if(ENABLE_JEMALLOC) @@ -48,12 +43,7 @@ if(ENABLE_MIMALLOC) endif() set(TS_HAS_MIMALLOC ${mimalloc_FOUND}) -if(ENABLE_TCMALLOC) - find_package(TCMalloc REQUIRED) -endif() -set(TS_HAS_TCMALLOC ${TCMalloc_FOUND}) - -if(TS_HAS_JEMALLOC OR TS_HAS_MIMALLOC OR TS_HAS_TCMALLOC) +if(TS_HAS_JEMALLOC OR TS_HAS_MIMALLOC) set(TS_HAS_MALLOC_REPLACEMENT TRUE) endif() @@ -62,7 +52,6 @@ mark_as_advanced( TS_HAS_MALLOC_REPLACEMENT TS_HAS_JEMALLOC TS_HAS_MIMALLOC - TS_HAS_TCMALLOC ) include(FindPackageHandleStandardArgs) @@ -83,10 +72,5 @@ if(TSMallocReplacement_FOUND AND NOT TARGET ts::TSMallocReplacement) INTERFACE mimalloc::mimalloc ) - elseif(TS_HAS_TCMALLOC) - target_link_libraries(ts::TSMallocReplacement - INTERFACE - gperftools::TCMalloc - ) endif() endif() diff --git a/configure.ac b/configure.ac index 9103b7dfb9f..e780703276a 100644 --- a/configure.ac +++ b/configure.ac @@ -1879,8 +1879,7 @@ AM_CONDITIONAL([HAS_WASM], [test "x${has_wasm}" = "x1" ]) AM_CONDITIONAL([BUILD_HEALTHCHECK_PLUGIN], [ test "$ac_cv_func_inotify_init" = "yes" ]) # -# Check for tcmalloc, jemalloc and mimalloc -TS_CHECK_TCMALLOC +# Check for jemalloc and mimalloc TS_CHECK_JEMALLOC TS_CHECK_MIMALLOC diff --git a/doc/developer-guide/testing/blackbox-testing.en.rst b/doc/developer-guide/testing/blackbox-testing.en.rst index 8e500f0936c..5bd7ef7754d 100644 --- a/doc/developer-guide/testing/blackbox-testing.en.rst +++ b/doc/developer-guide/testing/blackbox-testing.en.rst @@ -237,7 +237,6 @@ Condition Testing - TS_HAS_LZMA - TS_HAS_PIPE_BUFFER_SIZE_CONFIG - TS_HAS_JEMALLOC - - TS_HAS_TCMALLOC - TS_HAS_MIMALLOC - TS_HAS_IN6_IS_ADDR_UNSPECIFIED - TS_HAS_BACKTRACE diff --git a/include/tscore/ink_config.h.cmake.in b/include/tscore/ink_config.h.cmake.in index e1a21d1782c..56401d913af 100644 --- a/include/tscore/ink_config.h.cmake.in +++ b/include/tscore/ink_config.h.cmake.in @@ -118,7 +118,6 @@ const int DEFAULT_STACKSIZE = @DEFAULT_STACK_SIZE@; #cmakedefine01 TS_HAS_IN6_IS_ADDR_UNSPECIFIED #cmakedefine01 TS_HAS_IP_TOS #cmakedefine01 TS_HAS_JEMALLOC -#cmakedefine01 TS_HAS_TCMALLOC #cmakedefine01 TS_HAS_PROFILER #cmakedefine01 TS_HAS_QUICHE #cmakedefine01 TS_HAS_SO_MARK diff --git a/include/tscore/ink_config.h.in b/include/tscore/ink_config.h.in index 8f3fedc90ca..69574cc925e 100644 --- a/include/tscore/ink_config.h.in +++ b/include/tscore/ink_config.h.in @@ -51,7 +51,6 @@ /* Libraries */ #define TS_HAS_JEMALLOC @jemalloch@ -#define TS_HAS_TCMALLOC @has_tcmalloc@ #define TS_HAS_MIMALLOC @mimalloch@ #define TS_USE_MALLOC_ALLOCATOR @enable_malloc_allocator@ diff --git a/src/traffic_layout/info.cc b/src/traffic_layout/info.cc index dcd3a49e695..bb6d514cb4f 100644 --- a/src/traffic_layout/info.cc +++ b/src/traffic_layout/info.cc @@ -93,7 +93,6 @@ produce_features(bool json) print_feature("TS_HAS_PIPE_BUFFER_SIZE_CONFIG", 0, json); #endif /* F_GETPIPE_SZ */ print_feature("TS_HAS_JEMALLOC", TS_HAS_JEMALLOC, json); - print_feature("TS_HAS_TCMALLOC", TS_HAS_TCMALLOC, json); print_feature("TS_HAS_IN6_IS_ADDR_UNSPECIFIED", TS_HAS_IN6_IS_ADDR_UNSPECIFIED, json); print_feature("TS_HAS_BACKTRACE", TS_HAS_BACKTRACE, json); print_feature("TS_HAS_PROFILER", TS_HAS_PROFILER, json); diff --git a/tests/README.md b/tests/README.md index fdb89a4d167..3f732b8dcca 100644 --- a/tests/README.md +++ b/tests/README.md @@ -332,7 +332,6 @@ ts.Disk.remap_config.AddLine( * TS_HAS_LZMA * TS_HAS_PIPE_BUFFER_SIZE_CONFIG * TS_HAS_JEMALLOC - * TS_HAS_TCMALLOC * TS_HAS_MIMALLOC * TS_HAS_IN6_IS_ADDR_UNSPECIFIED * TS_HAS_BACKTRACE