From e93fd02e515326f5ff29c157055c007dc6957498 Mon Sep 17 00:00:00 2001 From: Wentao Zhang Date: Mon, 1 Jul 2024 22:56:06 -0500 Subject: [PATCH] ci: add condition limit back and search for a threshold (64) Note this is experimental and docs are not updated synchronously --- ci/2_pull_source.sh | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/ci/2_pull_source.sh b/ci/2_pull_source.sh index fb605ad..b541d17 100755 --- a/ci/2_pull_source.sh +++ b/ci/2_pull_source.sh @@ -11,7 +11,7 @@ git clone https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git --bra # Use the snapshot of LLVM on June 11 2024 cd $MCDC_HOME/llvm-project -git checkout f5dcfb9968a3 +# git checkout f5dcfb9968a3 # Apply kernel patches cd $MCDC_HOME/linux @@ -19,3 +19,20 @@ git apply $MCDC_HOME/linux-mcdc/patches/v0.5/0001-clang_instr_profile-add-Clang- git apply $MCDC_HOME/linux-mcdc/patches/v0.5/0002-kbuild-clang_instr_profile-disable-instrumentation-i.patch git apply $MCDC_HOME/linux-mcdc/patches/v0.5/0003-clang_instr_profile-add-Clang-s-MC-DC-support.patch git apply $MCDC_HOME/linux-mcdc/patches/v0.5/0004-kbuild-clang_instr_profile-disable-instrumentation-i.patch + +cat << EOF > /tmp/revert_condition_limit.diff +diff --git a/Makefile b/Makefile +index 1c4e329fa..bfcb36562 100644 +--- a/Makefile ++++ b/Makefile +@@ -688,7 +688,7 @@ all: vmlinux + CFLAGS_SCC_CLANG := -fprofile-instr-generate -fcoverage-mapping + export CFLAGS_SCC_CLANG + +-CFLAGS_MCDC_CLANG := -fcoverage-mcdc ++CFLAGS_MCDC_CLANG := -fcoverage-mcdc -Xclang -fmcdc-max-conditions=64 + export CFLAGS_MCDC_CLANG + + CFLAGS_GCOV := -fprofile-arcs -ftest-coverage +EOF +git apply /tmp/revert_condition_limit.diff