From patchwork Mon Apr 25 15:35:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102465 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp1106167qge; Mon, 25 Apr 2016 08:36:48 -0700 (PDT) X-Received: by 10.67.3.129 with SMTP id bw1mr48978505pad.16.1461598607950; Mon, 25 Apr 2016 08:36:47 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a5si3237833pfj.210.2016.04.25.08.36.47; Mon, 25 Apr 2016 08:36:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932859AbcDYPgk (ORCPT + 29 others); Mon, 25 Apr 2016 11:36:40 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:62320 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754817AbcDYPgP (ORCPT ); Mon, 25 Apr 2016 11:36:15 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue101) with ESMTPA (Nemesis) id 0MAdid-1b10592nQh-00BsvF; Mon, 25 Apr 2016 17:35:40 +0200 From: Arnd Bergmann To: Michal Marek Cc: linux-kbuild@vger.kernel.org, Peter Oberparleiter , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Arnd Bergmann , stable@vger.kernel.org Subject: [PATCH 4/5] gcov: disable tree-loop-im to reduce stack usage Date: Mon, 25 Apr 2016 17:35:30 +0200 Message-Id: <1461598531-2190169-5-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1461598531-2190169-1-git-send-email-arnd@arndb.de> References: <1461598531-2190169-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:Y/nkBGa71JYhCLL7jVck5A5OrT3Iphqf5SSQQaSVXnGuHkGtYZI 9TmzOn8aiT2IS8N6whIZA0E3PZTz6JeysqfBGzvhiunKfPqBqRs3qIfeYQo4B8arhidprVF MQHThBXbFwxlSRbRweQKVk6ubNbTVFRtOSPyxnHti09DGSnBIR5Pl+/ui4fEYAo158N2VL3 Wddu+3hfT2q8Zo+KzWt9A== X-UI-Out-Filterresults: notjunk:1; V01:K0:+4yc3/q7VPA=:MMeGSi33ck42xNbUF2r5lz OIL8+/wYXNsITExiHUsIMO/Km2aO4Pf8o+XlIwMdhqycrQ4LffVgKOOWtkO+wJwiTaxxBg8HP yGKlcrvcYlnBh2JBN0FwwPYA35nwnD/1er3zLPj5QsDOP1B5rMqmkHBaw2kBJDHESMXMyHJSP c4esYQFYTZJp5DYdujiGYz3cEaMqbc5pgk0D1dvbJP9OPsYJgZ2swhje6eUPS1iHKYpnLREL9 /MVEcY3Ilx96wWsSxcCSitwtJZ0VsNt6/ne3DZTnwn7b2MM+SNojrxsLTTX6ThL/Z3ggBjoDL 6LJ3ncg0kbX7M8xbpmk/v3AzhVGrruXfMmOqyPSXTCZRZ9n0JNyPQThosC6LPUfINei2zVHRP knO87J8gYCZDoZt6TG2v1rx2Z+1NQd1cV6NIEWj7AvujmqmM6i9Q95VhtJRjT91Muleq9FE2D IF05xNtN7zF5izq1JmAL3wDxVMEGWn7dx7WF1KY3DFl1RXBTP9tfMmVGSKzx5BOcRe1yrjXrE m/AiUKmWQImBxF5f1MyFFvzuqWHcBIj//4SmASZq69LDtf2t7PSDVve3SUhnEldV7NA4UIHgA 1LJYA9aqDQJB/mKwUquaHxKQlCwpEN9Z64Z4vH3AuiOV4kq2iCFMiJmRI2QsLxIqKEA4NJ88K ilRfLqo4YSvjVfS9ayrHXKiSh3OPaZrn2FKfBXjFty+yxDhGxc//2K14PjPI7P1NrNlo= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Acked-by: Peter Oberparleiter Cc: stable@vger.kernel.org --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.0 diff --git a/Makefile b/Makefile index e595d1f626b8..d74b38e70d6f 100644 --- a/Makefile +++ b/Makefile @@ -364,7 +364,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 CFLAGS_KCOV = -fsanitize-coverage=trace-pc