Skip to content

Commit

Permalink
I forgot we renamed things
Browse files Browse the repository at this point in the history
  • Loading branch information
whentojump committed Jul 3, 2024
1 parent 877df49 commit c485432
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ci/2_pull_source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ cd $MCDC_HOME/linux
git apply $MCDC_HOME/linux-mcdc/patches/v0.6-wip/0001-llvm-cov-add-Clang-s-Source-based-Code-Coverage-supp.patch
git apply $MCDC_HOME/linux-mcdc/patches/v0.6-wip/0002-kbuild-llvm-cov-disable-instrumentation-in-odd-or-se.patch
git apply $MCDC_HOME/linux-mcdc/patches/v0.6-wip/0003-llvm-cov-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
git apply $MCDC_HOME/linux-mcdc/patches/v0.6-wip/0004-kbuild-clang_instr_profile-disable-instrumentation-i.patch
2 changes: 1 addition & 1 deletion docs/measure-kernel-mcdc.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ cd $MCDC_HOME/linux
git apply $MCDC_HOME/linux-mcdc/patches/v0.6-wip/0001-llvm-cov-add-Clang-s-Source-based-Code-Coverage-supp.patch
git apply $MCDC_HOME/linux-mcdc/patches/v0.6-wip/0002-kbuild-llvm-cov-disable-instrumentation-in-odd-or-se.patch
git apply $MCDC_HOME/linux-mcdc/patches/v0.6-wip/0003-llvm-cov-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
git apply $MCDC_HOME/linux-mcdc/patches/v0.6-wip/0004-kbuild-clang_instr_profile-disable-instrumentation-i.patch
```

## 3. Get LLVM
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
From ba7f843a2a7b0e841664cdd0a38c6ba354e59ed2 Mon Sep 17 00:00:00 2001
From: Wentao Zhang <[email protected]>
Date: Tue, 11 Jun 2024 15:07:57 -0500
Subject: [RFC PATCH 4/4] kbuild, clang_instr_profile: disable instrumentation
in odd or sensitive code

Skip some extra files that are problematic with LLVM 19 MC/DC instrumentation

Signed-off-by: Wentao Zhang <[email protected]>
---
arch/x86/kernel/cpu/mtrr/Makefile | 3 +++
drivers/base/power/Makefile | 3 +++
drivers/gpu/drm/i915/Makefile | 3 +++
drivers/net/ethernet/intel/e1000/Makefile | 2 ++
net/ipv4/Makefile | 2 ++
5 files changed, 13 insertions(+)

diff --git a/arch/x86/kernel/cpu/mtrr/Makefile b/arch/x86/kernel/cpu/mtrr/Makefile
index cc4f9f1cb94c..72420689b303 100644
--- a/arch/x86/kernel/cpu/mtrr/Makefile
+++ b/arch/x86/kernel/cpu/mtrr/Makefile
@@ -1,4 +1,7 @@
# SPDX-License-Identifier: GPL-2.0-only
+
+LLVM_COV_PROFILE_generic.o := n
+
obj-y := mtrr.o if.o generic.o cleanup.o
obj-$(CONFIG_X86_32) += amd.o cyrix.o centaur.o

diff --git a/drivers/base/power/Makefile b/drivers/base/power/Makefile
index 8fdd0073eeeb..1cc1b432b3de 100644
--- a/drivers/base/power/Makefile
+++ b/drivers/base/power/Makefile
@@ -1,4 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
+
+LLVM_COV_PROFILE_main.o := n
+
obj-$(CONFIG_PM) += sysfs.o generic_ops.o common.o qos.o runtime.o wakeirq.o
obj-$(CONFIG_PM_SLEEP) += main.o wakeup.o wakeup_stats.o
obj-$(CONFIG_PM_TRACE_RTC) += trace.o
diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
index 9d371be7dc5c..ed1e1a4bfce6 100644
--- a/drivers/gpu/drm/i915/Makefile
+++ b/drivers/gpu/drm/i915/Makefile
@@ -12,6 +12,9 @@
# Note the danger in using -Wall -Wextra is that when CI updates gcc we
# will most likely get a sudden build breakage... Hopefully we will fix
# new warnings before CI updates!
+
+LLVM_COV_PROFILE_intel_bios.o := n
+
subdir-ccflags-y := -Wall -Wextra
subdir-ccflags-y += $(call cc-disable-warning, unused-parameter)
subdir-ccflags-y += $(call cc-disable-warning, type-limits)
diff --git a/drivers/net/ethernet/intel/e1000/Makefile b/drivers/net/ethernet/intel/e1000/Makefile
index 314c52d44b7c..539c7c469d73 100644
--- a/drivers/net/ethernet/intel/e1000/Makefile
+++ b/drivers/net/ethernet/intel/e1000/Makefile
@@ -5,6 +5,8 @@
# Makefile for the Intel(R) PRO/1000 ethernet driver
#

+LLVM_COV_PROFILE_e1000_main.o := n
+
obj-$(CONFIG_E1000) += e1000.o

e1000-objs := e1000_main.o e1000_hw.o e1000_ethtool.o e1000_param.o
diff --git a/net/ipv4/Makefile b/net/ipv4/Makefile
index bbdd9c44f14e..80cc562210b0 100644
--- a/net/ipv4/Makefile
+++ b/net/ipv4/Makefile
@@ -3,6 +3,8 @@
# Makefile for the Linux TCP/IP (INET) layer.
#

+LLVM_COV_PROFILE_ipconfig.o := n
+
obj-y := route.o inetpeer.o protocol.o \
ip_input.o ip_fragment.o ip_forward.o ip_options.o \
ip_output.o ip_sockglue.o inet_hashtables.o \
--
2.34.1

0 comments on commit c485432

Please sign in to comment.