Skip to content

Commit

Permalink
Revert "[fix](memory) Fix Jemalloc hook failed to start BE with JDK 17
Browse files Browse the repository at this point in the history
…apache#33946" (apache#34107)

This reverts commit 5fee715.
  • Loading branch information
xinyiZzz authored Apr 25, 2024
1 parent a12b410 commit 132d974
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 17 deletions.
5 changes: 0 additions & 5 deletions be/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ option(USE_LIBCPP "Use libc++" OFF)
option(USE_MEM_TRACKER, "Use memory tracker" ON)
option(USE_UNWIND "Use libunwind" ON)
option(USE_JEMALLOC "Use jemalloc" ON)
option(USE_JEMALLOC_HOOK "Use jemalloc hook" ON)
if (OS_MACOSX)
set(GLIBC_COMPATIBILITY OFF)
set(USE_LIBCPP ON)
Expand All @@ -88,7 +87,6 @@ message(STATUS "GLIBC_COMPATIBILITY is ${GLIBC_COMPATIBILITY}")
message(STATUS "USE_LIBCPP is ${USE_LIBCPP}")
message(STATUS "USE_MEM_TRACKER is ${USE_MEM_TRACKER}")
message(STATUS "USE_JEMALLOC is ${USE_JEMALLOC}")
message(STATUS "USE_JEMALLOC_HOOK is ${USE_JEMALLOC_HOOK}")
message(STATUS "USE_UNWIND is ${USE_UNWIND}")
message(STATUS "ENABLE_PCH is ${ENABLE_PCH}")

Expand Down Expand Up @@ -348,9 +346,6 @@ endif()
if (USE_JEMALLOC)
add_definitions(-DUSE_JEMALLOC)
endif()
if (USE_JEMALLOC_HOOK)
add_definitions(-DUSE_JEMALLOC_HOOK)
endif()

# Compile with libunwind
if (USE_UNWIND)
Expand Down
2 changes: 1 addition & 1 deletion be/src/runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ set(EXECUTABLE_OUTPUT_PATH "${BUILD_DIR}/src/runtime")

file(GLOB_RECURSE RUNTIME_FILES CONFIGURE_DEPENDS *.cpp *.cc)

if (NOT USE_JEMALLOC OR NOT USE_MEM_TRACKER OR NOT USE_JEMALLOC_HOOK)
if (NOT USE_JEMALLOC OR NOT USE_MEM_TRACKER)
list(REMOVE_ITEM RUNTIME_FILES ${CMAKE_CURRENT_SOURCE_DIR}/memory/jemalloc_hook.cpp)
endif()

Expand Down
6 changes: 0 additions & 6 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -356,9 +356,6 @@ fi
if [[ -z "${USE_JEMALLOC}" ]]; then
USE_JEMALLOC='ON'
fi
if [[ -z "${USE_JEMALLOC_HOOK}" ]]; then
USE_JEMALLOC_HOOK='OFF'
fi
if [[ -z "${USE_BTHREAD_SCANNER}" ]]; then
USE_BTHREAD_SCANNER='OFF'
fi
Expand Down Expand Up @@ -464,7 +461,6 @@ echo "Get params:
STRIP_DEBUG_INFO -- ${STRIP_DEBUG_INFO}
USE_MEM_TRACKER -- ${USE_MEM_TRACKER}
USE_JEMALLOC -- ${USE_JEMALLOC}
USE_JEMALLOC_HOOK -- ${USE_JEMALLOC_HOOK}
USE_BTHREAD_SCANNER -- ${USE_BTHREAD_SCANNER}
ENABLE_STACKTRACE -- ${ENABLE_STACKTRACE}
ENABLE_INJECTION_POINT -- ${ENABLE_INJECTION_POINT}
Expand Down Expand Up @@ -567,7 +563,6 @@ if [[ "${BUILD_BE}" -eq 1 ]]; then
-DENABLE_PCH="${ENABLE_PCH}" \
-DUSE_MEM_TRACKER="${USE_MEM_TRACKER}" \
-DUSE_JEMALLOC="${USE_JEMALLOC}" \
-DUSE_JEMALLOC_HOOK="${USE_JEMALLOC_HOOK}" \
-DENABLE_STACKTRACE="${ENABLE_STACKTRACE}" \
-DUSE_AVX2="${USE_AVX2}" \
-DGLIBC_COMPATIBILITY="${GLIBC_COMPATIBILITY}" \
Expand Down Expand Up @@ -611,7 +606,6 @@ if [[ "${BUILD_CLOUD}" -eq 1 ]]; then
-DSTRIP_DEBUG_INFO="${STRIP_DEBUG_INFO}" \
-DUSE_DWARF="${USE_DWARF}" \
-DUSE_JEMALLOC="${USE_JEMALLOC}" \
-DUSE_JEMALLOC_HOOK="${USE_JEMALLOC_HOOK}" \
-DEXTRA_CXX_FLAGS="${EXTRA_CXX_FLAGS}" \
-DBUILD_CHECK_META="${BUILD_CHECK_META:-OFF}" \
"${DORIS_HOME}/cloud/"
Expand Down
3 changes: 0 additions & 3 deletions cloud/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,6 @@ endif ()
if (USE_JEMALLOC)
set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -DUSE_JEMALLOC")
endif()
if (USE_JEMALLOC_HOOK)
set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -DUSE_JEMALLOC_HOOK")
endif()

if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0)
set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -faligned-new")
Expand Down
2 changes: 1 addition & 1 deletion cloud/src/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ set(COMMON_FILES
network_util.cpp
)

if (USE_JEMALLOC AND USE_JEMALLOC_HOOK)
if (USE_JEMALLOC)
set(COMMON_FILES ${COMMON_FILES}
jemalloc_hook.cpp
)
Expand Down
1 change: 0 additions & 1 deletion regression-test/pipeline/performance/compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ sudo docker run -i --rm \
&& export CCACHE_REMOTE_STORAGE=file:///root/ccache \
&& export EXTRA_CXX_FLAGS=-O3 \
&& export USE_JEMALLOC='ON' \
&& export USE_JEMALLOC_HOOK='OFF' \
&& export ENABLE_PCH=OFF ${jdk17_str}\
&& export CUSTOM_NPM_REGISTRY=https://registry.npmjs.org \
&& bash build.sh --fe --be --clean 2>&1 | tee build.log"
Expand Down

0 comments on commit 132d974

Please sign in to comment.