From 956b005853b49dcfa60422db364ecc0db6d57110 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E8=B6=8A?= Date: Fri, 28 Jun 2024 17:59:24 +0800 Subject: [PATCH 1/5] [FLINK-35575] Disable PERF_CONTEXT by default in compilation --- FROCKSDB-RELEASE.md | 2 +- Makefile | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/FROCKSDB-RELEASE.md b/FROCKSDB-RELEASE.md index 2cd092d88..3f5b0a5cf 100644 --- a/FROCKSDB-RELEASE.md +++ b/FROCKSDB-RELEASE.md @@ -195,7 +195,7 @@ To start the crossbuild within a Mac OSX environment: cp /librocksdbjni-linux-ppc64le-musl.so java/target/librocksdbjni-linux-ppc64le-musl.so cp /librocksdbjni-linux-aarch64.so java/target/librocksdbjni-linux-aarch64.so cp /librocksdbjni-linux-aarch64-musl.so java/target/librocksdbjni-linux-aarch64-musl.so - FROCKSDB_VERSION=1.0 PORTABLE=1 ROCKSDB_DISABLE_JEMALLOC=true DEBUG_LEVEL=0 make frocksdbjavastaticreleasedocker + FROCKSDB_VERSION=1.0 PORTABLE=1 ROCKSDB_DISABLE_JEMALLOC=true DEBUG_LEVEL=0 DISABLE_PERF_CONTEXT=1 make frocksdbjavastaticreleasedocker *Note, we disable jemalloc on mac due to https://github.com/facebook/rocksdb/issues/5787*. diff --git a/Makefile b/Makefile index cafd48529..0becec995 100644 --- a/Makefile +++ b/Makefile @@ -429,6 +429,12 @@ ifndef DISABLE_JEMALLOC PLATFORM_CCFLAGS += $(JEMALLOC_INCLUDE) endif +DISABLE_PERF_CONTEXT ?= 0 +ifeq ($(DISABLE_PERF_CONTEXT),1) + PLATFORM_CXXFLAGS += -DNPERF_CONTEXT + PLATFORM_CCFLAGS += -DNPERF_CONTEXT +endif + ifndef USE_FOLLY USE_FOLLY=0 endif From f646cbaf7dfc1f7ade096ff8f74bd206e2c3f881 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E8=B6=8A?= Date: Mon, 22 Jul 2024 17:03:02 +0800 Subject: [PATCH 2/5] DISABLE_PERF_CONTEXT in build script --- java/crossbuild/docker-build-linux-alpine.sh | 2 +- java/crossbuild/docker-build-linux-centos.sh | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/java/crossbuild/docker-build-linux-alpine.sh b/java/crossbuild/docker-build-linux-alpine.sh index e3e852efe..d7f958f48 100755 --- a/java/crossbuild/docker-build-linux-alpine.sh +++ b/java/crossbuild/docker-build-linux-alpine.sh @@ -12,6 +12,6 @@ cp -r /rocksdb-host/* /rocksdb-local-build cd /rocksdb-local-build make clean-not-downloaded -PORTABLE=1 make -j2 rocksdbjavastatic +PORTABLE=1 DISABLE_PERF_CONTEXT=1 make -j2 rocksdbjavastatic cp java/target/librocksdbjni-linux*.so java/target/rocksdbjni-*-linux*.jar java/target/rocksdbjni-*-linux*.jar.sha1 /rocksdb-java-target diff --git a/java/crossbuild/docker-build-linux-centos.sh b/java/crossbuild/docker-build-linux-centos.sh index 16581dec7..1a645a1c0 100755 --- a/java/crossbuild/docker-build-linux-centos.sh +++ b/java/crossbuild/docker-build-linux-centos.sh @@ -16,22 +16,23 @@ if hash scl 2>/dev/null; then if scl --list | grep -q 'devtoolset-8'; then # CentOS 6+ scl enable devtoolset-8 'make clean-not-downloaded' - scl enable devtoolset-8 'PORTABLE=1 make -j2 rocksdbjavastatic' + scl enable devtoolset-8 'PORTABLE=1 DISABLE_PERF_CONTEXT=1 make -j2 rocksdbjavastatic' elif scl --list | grep -q 'devtoolset-7'; then # CentOS 6+ scl enable devtoolset-7 'make clean-not-downloaded' - scl enable devtoolset-7 'PORTABLE=1 make -j2 rocksdbjavastatic' + scl enable devtoolset-7 'PORTABLE=1 DISABLE_PERF_CONTEXT=1 make -j2 rocksdbjavastatic' elif scl --list | grep -q 'devtoolset-2'; then # CentOS 5 or 6 scl enable devtoolset-2 'make clean-not-downloaded' - scl enable devtoolset-2 'PORTABLE=1 make -j2 rocksdbjavastatic' + scl enable devtoolset-2 'PORTABLE=1 DISABLE_PERF_CONTEXT=1 make -j2 rocksdbjavastatic' else echo "Could not find devtoolset" exit 1; fi else make clean-not-downloaded - PORTABLE=1 make -j2 rocksdbjavastatic + echo "PORTABLE=1 DISABLE_PERF_CONTEXT=1 make -j2 rocksdbjavastatic" + PORTABLE=1 DISABLE_PERF_CONTEXT=1 make -j2 rocksdbjavastatic fi cp java/target/librocksdbjni-linux*.so java/target/rocksdbjni-*-linux*.jar java/target/rocksdbjni-*-linux*.jar.sha1 /rocksdb-java-target From 5320c1c3d3d4b4b62f305bab301c4932bba5a97d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E8=B6=8A?= Date: Tue, 23 Jul 2024 14:26:13 +0800 Subject: [PATCH 3/5] test DISABLE_PERF_CONTEXT --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0becec995..bb39c2350 100644 --- a/Makefile +++ b/Makefile @@ -429,7 +429,7 @@ ifndef DISABLE_JEMALLOC PLATFORM_CCFLAGS += $(JEMALLOC_INCLUDE) endif -DISABLE_PERF_CONTEXT ?= 0 +DISABLE_PERF_CONTEXT ?= 1 ifeq ($(DISABLE_PERF_CONTEXT),1) PLATFORM_CXXFLAGS += -DNPERF_CONTEXT PLATFORM_CCFLAGS += -DNPERF_CONTEXT From c69e3fb5baa135affff912babdd140d78bb15993 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E8=B6=8A?= Date: Mon, 12 Aug 2024 19:53:39 +0800 Subject: [PATCH 4/5] update config --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1c1feced2..eaf8461fa 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -45,6 +45,7 @@ commands: echo "export SNAPPY_DOWNLOAD_BASE=https://rocksdb-deps.s3.us-west-2.amazonaws.com/pkgs/snappy" >> $BASH_ENV echo "export LZ4_DOWNLOAD_BASE=https://rocksdb-deps.s3.us-west-2.amazonaws.com/pkgs/lz4" >> $BASH_ENV echo "export ZSTD_DOWNLOAD_BASE=https://rocksdb-deps.s3.us-west-2.amazonaws.com/pkgs/zstd" >> $BASH_ENV + echo "export DISABLE_PERF_CONTEXT=0" >> $BASH_ENV windows-build-steps: steps: From 901772c36fedfbaf0139d8b4d631b59abad50531 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E8=B6=8A?= Date: Mon, 12 Aug 2024 21:30:39 +0800 Subject: [PATCH 5/5] fix ci --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index eaf8461fa..23466cf48 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -362,7 +362,7 @@ jobs: resource_class: xlarge steps: - checkout # check out the code in the project directory - - run: CC=clang CXX=clang++ USE_CLANG=1 PORTABLE=1 make V=1 -j16 all + - run: CC=clang CXX=clang++ USE_CLANG=1 PORTABLE=1 DISABLE_PERF_CONTEXT=0 make V=1 -j16 all - post-steps build-linux-clang10-asan: @@ -475,7 +475,7 @@ jobs: - run: apt-get update -y && apt-get install -y libgflags-dev - run: name: "Unity build" - command: make V=1 -j8 unity_test + command: DISABLE_PERF_CONTEXT=0 make V=1 -j8 unity_test no_output_timeout: 20m - run: make V=1 -j8 -k check-headers # could be moved to a different build - post-steps