Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1332837 > unrolled thread

[PATCH 3/5] gcov: disable for COMPILE_TEST

Started byArnd Bergmann <arnd@arndb.de>
First post2016-02-12 17:10 +0100
Last post2016-02-15 15:30 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 3/5] gcov: disable for COMPILE_TEST Arnd Bergmann <arnd@arndb.de> - 2016-02-12 17:10 +0100
    Re: [PATCH 3/5] gcov: disable for COMPILE_TEST Peter Oberparleiter <oberpar@linux.vnet.ibm.com> - 2016-02-15 15:30 +0100

#1332837 — [PATCH 3/5] gcov: disable for COMPILE_TEST

FromArnd Bergmann <arnd@arndb.de>
Date2016-02-12 17:10 +0100
Subject[PATCH 3/5] gcov: disable for COMPILE_TEST
Message-ID<r1os9-Pl-3@gated-at.bofh.it>
Enabling gcov is counterproductive to compile testing: it significantly
increases the kernel image size, compile time, and it produces lots
of false positive "may be used uninitialized" warnings as the result
of missed optimizations.

This is in line with how UBSAN_SANITIZE_ALL and PROFILE_ALL_BRANCHES
work, both of which have similar problems.

With an ARM allmodconfig kernel, I see the build time drop from
283 minutes CPU time to 225 minutes, and the vmlinux size drops
from 43MB to 26MB.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 kernel/gcov/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/gcov/Kconfig b/kernel/gcov/Kconfig
index c92e44855ddd..1276aabaab55 100644
--- a/kernel/gcov/Kconfig
+++ b/kernel/gcov/Kconfig
@@ -37,6 +37,7 @@ config ARCH_HAS_GCOV_PROFILE_ALL
 
 config GCOV_PROFILE_ALL
 	bool "Profile entire Kernel"
+	depends on !COMPILE_TEST
 	depends on GCOV_KERNEL
 	depends on ARCH_HAS_GCOV_PROFILE_ALL
 	default n
-- 
2.7.0

[toc] | [next] | [standalone]


#1334484

FromPeter Oberparleiter <oberpar@linux.vnet.ibm.com>
Date2016-02-15 15:30 +0100
Message-ID<r2sk2-2aV-15@gated-at.bofh.it>
In reply to#1332837
On 12.02.2016 17:06, Arnd Bergmann wrote:
> Enabling gcov is counterproductive to compile testing: it significantly
> increases the kernel image size, compile time, and it produces lots
> of false positive "may be used uninitialized" warnings as the result
> of missed optimizations.
> 
> This is in line with how UBSAN_SANITIZE_ALL and PROFILE_ALL_BRANCHES
> work, both of which have similar problems.
> 
> With an ARM allmodconfig kernel, I see the build time drop from
> 283 minutes CPU time to 225 minutes, and the vmlinux size drops
> from 43MB to 26MB.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Agreed that COMPILE_TEST + GCOV_PROFILE_ALL is a very exotic combination
with little added use.

Acked-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>

> ---
>  kernel/gcov/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/kernel/gcov/Kconfig b/kernel/gcov/Kconfig
> index c92e44855ddd..1276aabaab55 100644
> --- a/kernel/gcov/Kconfig
> +++ b/kernel/gcov/Kconfig
> @@ -37,6 +37,7 @@ config ARCH_HAS_GCOV_PROFILE_ALL
> 
>  config GCOV_PROFILE_ALL
>  	bool "Profile entire Kernel"
> +	depends on !COMPILE_TEST
>  	depends on GCOV_KERNEL
>  	depends on ARCH_HAS_GCOV_PROFILE_ALL
>  	default n
> 


-- 
Peter Oberparleiter
Linux on z Systems Development - IBM Germany

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web