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: 8929801 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1B74F9F39D for ; Mon, 25 Apr 2016 15:36:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 401F8201C7 for ; Mon, 25 Apr 2016 15:36:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BCF1920155 for ; Mon, 25 Apr 2016 15:36:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754851AbcDYPgj (ORCPT ); Mon, 25 Apr 2016 11:36:39 -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-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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