mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Use jemalloc (#987)
* use jemalloc * install system jemalloc in github action * check if jemalloc is actually used --------- Co-authored-by: neodiX <neodix42@ton.org>
This commit is contained in:
parent
d5c09936cf
commit
136b99b8d1
5 changed files with 9 additions and 7 deletions
|
@ -19,7 +19,7 @@ jobs:
|
||||||
- name: Install system libraries
|
- name: Install system libraries
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y build-essential git cmake ninja-build zlib1g-dev libsecp256k1-dev libmicrohttpd-dev libsodium-dev liblz4-dev
|
sudo apt-get install -y build-essential git cmake ninja-build zlib1g-dev libsecp256k1-dev libmicrohttpd-dev libsodium-dev liblz4-dev libjemalloc-dev
|
||||||
|
|
||||||
- name: Install clang-16
|
- name: Install clang-16
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -234,7 +234,7 @@ if (THREADS_HAVE_PTHREAD_ARG)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (TON_USE_JEMALLOC)
|
if (TON_USE_JEMALLOC)
|
||||||
find_package(JeMalloc REQUIRED)
|
find_package(jemalloc REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(MEMPROF "" CACHE STRING "Use one of \"ON\", \"FAST\" or \"SAFE\" to enable memory profiling. \
|
set(MEMPROF "" CACHE STRING "Use one of \"ON\", \"FAST\" or \"SAFE\" to enable memory profiling. \
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
FROM ubuntu:22.04 as builder
|
FROM ubuntu:22.04 as builder
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential cmake clang openssl libssl-dev zlib1g-dev gperf wget git ninja-build libsecp256k1-dev libsodium-dev libmicrohttpd-dev liblz4-dev pkg-config autoconf automake libtool && \
|
DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential cmake clang openssl libssl-dev zlib1g-dev gperf wget git ninja-build libsecp256k1-dev libsodium-dev libmicrohttpd-dev liblz4-dev pkg-config autoconf automake libtool libjemalloc-dev && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
ENV CC clang
|
ENV CC clang
|
||||||
ENV CXX clang++
|
ENV CXX clang++
|
||||||
|
@ -14,12 +14,12 @@ COPY ./ ./
|
||||||
|
|
||||||
RUN mkdir build && \
|
RUN mkdir build && \
|
||||||
cd build && \
|
cd build && \
|
||||||
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DPORTABLE=1 -DTON_ARCH= .. && \
|
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DPORTABLE=1 -DTON_ARCH= -DTON_USE_JEMALLOC=ON .. && \
|
||||||
ninja storage-daemon storage-daemon-cli tonlibjson fift func validator-engine validator-engine-console generate-random-id dht-server lite-client
|
ninja storage-daemon storage-daemon-cli tonlibjson fift func validator-engine validator-engine-console generate-random-id dht-server lite-client
|
||||||
|
|
||||||
FROM ubuntu:22.04
|
FROM ubuntu:22.04
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install -y wget libatomic1 openssl libsecp256k1-dev libsodium-dev libmicrohttpd-dev liblz4-dev && \
|
apt-get install -y wget libatomic1 openssl libsecp256k1-dev libsodium-dev libmicrohttpd-dev liblz4-dev libjemalloc-dev && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
RUN mkdir -p /var/ton-work/db && \
|
RUN mkdir -p /var/ton-work/db && \
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#/bin/bash
|
#/bin/bash
|
||||||
|
|
||||||
#sudo apt-get update
|
#sudo apt-get update
|
||||||
#sudo apt-get install -y build-essential git cmake ninja-build zlib1g-dev libsecp256k1-dev libmicrohttpd-dev libsodium-dev liblz4-dev
|
#sudo apt-get install -y build-essential git cmake ninja-build zlib1g-dev libsecp256k1-dev libmicrohttpd-dev libsodium-dev liblz4-dev libjemalloc-dev
|
||||||
|
|
||||||
with_tests=false
|
with_tests=false
|
||||||
with_artifacts=false
|
with_artifacts=false
|
||||||
|
@ -42,7 +42,7 @@ else
|
||||||
echo "Using compiled openssl_3"
|
echo "Using compiled openssl_3"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cmake -GNinja .. \
|
cmake -GNinja -DTON_USE_JEMALLOC=ON .. \
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
-DOPENSSL_ROOT_DIR=$opensslPath \
|
-DOPENSSL_ROOT_DIR=$opensslPath \
|
||||||
-DOPENSSL_INCLUDE_DIR=$opensslPath/include \
|
-DOPENSSL_INCLUDE_DIR=$opensslPath/include \
|
||||||
|
@ -96,6 +96,8 @@ test $? -eq 0 || { echo "Can't strip final binaries"; exit 1; }
|
||||||
./lite-client/lite-client -V || exit 1
|
./lite-client/lite-client -V || exit 1
|
||||||
./crypto/fift -V || exit 1
|
./crypto/fift -V || exit 1
|
||||||
|
|
||||||
|
ldd ./validator-engine/validator-engine || exit 1
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
if [ "$with_artifacts" = true ]; then
|
if [ "$with_artifacts" = true ]; then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue