From patchwork Fri Feb 12 16:06:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102788 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp912766lbl; Fri, 12 Feb 2016 08:07:57 -0800 (PST) X-Received: by 10.66.142.200 with SMTP id ry8mr3247667pab.31.1455293276912; Fri, 12 Feb 2016 08:07:56 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id wl2si20694241pab.236.2016.02.12.08.07.56; Fri, 12 Feb 2016 08:07:56 -0800 (PST) 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 S1751882AbcBLQHv (ORCPT + 30 others); Fri, 12 Feb 2016 11:07:51 -0500 Received: from mout.kundenserver.de ([212.227.126.131]:49734 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751451AbcBLQHs (ORCPT ); Fri, 12 Feb 2016 11:07:48 -0500 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue001) with ESMTPA (Nemesis) id 0M1NdZ-1aAx571aDR-00tVMT; Fri, 12 Feb 2016 17:07:12 +0100 From: Arnd Bergmann To: Michal Marek Cc: linux-arm-kernel@lists.infradead.org, Peter Oberparleiter , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Arnd Bergmann Subject: [PATCH 4/5] gcov: disable tree-loop-im to reduce stack usage Date: Fri, 12 Feb 2016 17:06:21 +0100 Message-Id: <1455293187-179811-5-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1455293187-179811-1-git-send-email-arnd@arndb.de> References: <1455293187-179811-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:x/jMpVkUysqmD34epmDM+BoZ6elgxq12s3MRWysAhiBbFPa60uA gL7OYWzSfe3T3ORq9IqDWkXVeDN+5PTlV3WaIiXmDYbXaUphCE98fRuXuNfvbEzcpF9iozE w8HKB7haDQ8inkNIuIFK/GdLvjMKle1GnGRpM/HHtfMnRwL6Sl+RwW0UKUL+Cjia6boQA9z RSTygYcYrjPjle6yEsEAA== X-UI-Out-Filterresults: notjunk:1; V01:K0:3CJKc2b1+iQ=:Pbw2fgkCQx/Zyu1LnjmwDt tj0KYQsDlQJxfJwZxghA0spCMpfpU37uIbxzFf0WCvxNRhFaiM6CNFxYQmrqCjypFSsbixw/H b+2VErBEy1evJUlL8Mlxkm47+lheU6uoLrCB8lLjMG9XOE+HOsbPfLijibq4k86s9FzQ+X8MX 5IWaUfVFqe7B30/ZaLeaBL9Gj2EEmEY/gvIsyZPNzfKMLzmqNpdN0lvE45uKIMncosk+F0hD1 QdXb/XufSntgqyyWBThfdnkTN0MGriM0Gi0C0ZfOqQSH4Qn1Bpf+Fl6fAskX/2poubPje5HAQ 076xql+809+613CYZjMBBTi0VBXkFJGR9M4jkPN64a+52sjZJ1wH5VtwhnLy/2L7TW+BtE9el U3ikB9tEHM5GdJZCDA0EQzqu/ZsJoBHFY6d0NQs5g22NWSN1obJXp7IMtK7uDAj2Q+IrmfD8X Y1vRdL7lcZ/uesVyQ4CZfEzgSlWBKGmu/33ZYbhGBVLVSu1uMbNqeA0WrcZ1kPgWKy5VQo2TX lM/0m8yDdKMpbtFIt7l3UyWyHL7cKWxD7G2s83hfRpOJ9iVun5WFr53uZoVgnECIYFoaSy30v Ohuu8usUhamcie6gbPKGGXg1LrytK5qmi97DqCqB91nM+HWg3GhB+O3VG7VJv3C5NqDpAtw1u VtMjT1zQ8hnRzPv28gHgb2B3wpV2AN9BkZKLImj3gGVgKrn66SSptvcAx+mY8qHRvA6Y= 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. Signed-off-by: Arnd Bergmann --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.0 diff --git a/Makefile b/Makefile index 352f55ccc54e..6bb89728a9d1 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