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


Groups > linux.kernel > #1501755

[PATCH 3.12 01/84] gcov: disable tree-loop-im to reduce stack usage

From Jiri Slaby <jslaby@suse.cz>
Newsgroups linux.kernel
Subject [PATCH 3.12 01/84] gcov: disable tree-loop-im to reduce stack usage
Date 2016-10-17 10:20 +0200
Message-ID <staZY-A3-7@gated-at.bofh.it> (permalink)
References <stb9D-Tq-25@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Arnd Bergmann <arnd@arndb.de>

3.12-stable review patch.  If anyone has any objections, please let me know.

===============

commit c87bf431448b404a6ef5fbabd74c0e3e42157a7f upstream.

Enabling CONFIG_GCOV_PROFILE_ALL produces us a lot of warnings like

lib/lz4/lz4hc_compress.c: In function 'lz4_compresshcctx':
lib/lz4/lz4hc_compress.c:514:1: warning: the frame size of 1504 bytes is larger than 1024 bytes [-Wframe-larger-than=]

After some investigation, I found that this behavior started with gcc-4.9,
and opened https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69702.
A suggested workaround for it is to use the -fno-tree-loop-im
flag that turns off one of the optimization stages in gcc, so the
code runs a little slower but does not use excessive amounts
of stack.

We could make this conditional on the gcc version, but I could not
find an easy way to do this in Kbuild and the benefit would be
fairly small, given that most of the gcc version in production are
affected now.

I'm marking this for 'stable' backports because it addresses a bug
with code generation in gcc that exists in all kernel versions
with the affected gcc releases.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
Signed-off-by: Michal Marek <mmarek@suse.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index a90b363b3493..4c1baa9b6bae 100644
--- a/Makefile
+++ b/Makefile
@@ -347,7 +347,7 @@ AFLAGS_MODULE   =
 LDFLAGS_MODULE  =
 CFLAGS_KERNEL	=
 AFLAGS_KERNEL	=
-CFLAGS_GCOV	= -fprofile-arcs -ftest-coverage
+CFLAGS_GCOV	= -fprofile-arcs -ftest-coverage -fno-tree-loop-im
 
 
 # Use USERINCLUDE when you must reference the UAPI directories only.
-- 
2.10.1

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 3.12 00/84] 3.12.65-stable review Jiri Slaby <jslaby@suse.cz> - 2016-10-17 10:10 +0200
  [PATCH 3.12 01/84] gcov: disable tree-loop-im to reduce stack usage Jiri Slaby <jslaby@suse.cz> - 2016-10-17 10:20 +0200
    [PATCH 3.12 43/84] drm/radeon/si/dpm: add workaround for for Jet parts Jiri Slaby <jslaby@suse.cz> - 2016-10-17 10:20 +0200
    [PATCH 3.12 17/84] fix fault_in_multipages_...() on architectures with no-op access_ok() Jiri Slaby <jslaby@suse.cz> - 2016-10-17 10:30 +0200
    [PATCH 3.12 11/84] Disable "maybe-uninitialized" warning globally Jiri Slaby <jslaby@suse.cz> - 2016-10-17 10:30 +0200
    [PATCH 3.12 13/84] Makefile: Mute warning for __builtin_return_address(>0) for tracing only Jiri Slaby <jslaby@suse.cz> - 2016-10-17 10:30 +0200
    [PATCH 3.12 20/84] tracing: Move mutex to protect against resetting of seq data Jiri Slaby <jslaby@suse.cz> - 2016-10-17 10:30 +0200
    [PATCH 3.12 18/84] mtd: pmcmsp-flash: Allocating too much in init_msp_flash() Jiri Slaby <jslaby@suse.cz> - 2016-10-17 10:30 +0200
    [PATCH 3.12 12/84] Disable "frame-address" warning Jiri Slaby <jslaby@suse.cz> - 2016-10-17 10:30 +0200
    [PATCH 3.12 15/84] iwlegacy: avoid warning about missing braces Jiri Slaby <jslaby@suse.cz> - 2016-10-17 10:30 +0200
    [PATCH 3.12 14/84] net: caif: fix misleading indentation Jiri Slaby <jslaby@suse.cz> - 2016-10-17 10:30 +0200
  Re: [PATCH 3.12 00/84] 3.12.65-stable review Guenter Roeck <linux@roeck-us.net> - 2016-10-17 20:40 +0200
  Re: [PATCH 3.12 00/84] 3.12.65-stable review Shuah Khan <shuah.kh@samsung.com> - 2016-10-18 00:20 +0200

csiph-web