Re: [RFC PATCH 2/3] kbuild, llvm-cov: disable instrumentation in odd or sensitive code

Thomas Gleixner
2024-08-25T12:12:30Z

On Sat, Aug 24 2024 at 18:06, Wentao Zhang wrote:

The subject line is really not useful. What's 'odd' code?

> Disable instrumentation in the same areas that were disabled for
> kernel/gcov/

> Signed-off-by: Wentao Zhang <wentaoz5@illinois.edu>
> Signed-off-by: Chuck Wolber <chuck.wolber@boeing.com>

This Signed-off-by chain is broken. See Documentation/process/

> diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile
> index 9cc0ff6e9067..2cc2c55af305 100644
> --- a/arch/x86/boot/Makefile
> +++ b/arch/x86/boot/Makefile
> @@ -57,6 +57,7 @@ KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__
> KBUILD_CFLAGS += $(call cc-option,-fmacro-prefix-map=$(srctree)/=)
> KBUILD_CFLAGS += -fno-asynchronous-unwind-tables
> KBUILD_CFLAGS += $(CONFIG_CC_IMPLICIT_FALLTHROUGH)
> +LLVM_COV_PROFILE := n

See 7f7f6f7ad654 ("Makefile: remove redundant tool coverage variables")

Also a 'git grep GCOV_PROFILE' shows way more places. Can't LLVM_COV
just use the already existing GCOV_PROFILE annotations or is LLVM_COV
suitable for all the files which have been excluded for GCOV?

GCOV has GCOV_PROFILE_obj.o, GCOV_PROFILE and CONFIG_GCOV_PROFILE_ALL
for a reason, no?

Thanks,

tglx