Return-Path: Received: from mail-lb0-f176.google.com ([209.85.217.176]:33380 "EHLO mail-lb0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751984AbbFYIVv (ORCPT ); Thu, 25 Jun 2015 04:21:51 -0400 Received: by lbbvz5 with SMTP id vz5so40747728lbb.0 for ; Thu, 25 Jun 2015 01:21:50 -0700 (PDT) From: Rasmus Villemoes Subject: [RFC v2 0/4] scripts: add stack{usage,delta} scripts Date: Thu, 25 Jun 2015 10:21:28 +0200 Message-Id: <1435220492-15868-1-git-send-email-linux@rasmusvillemoes.dk> In-Reply-To: <1434849046-19920-1-git-send-email-linux@rasmusvillemoes.dk> References: <1434849046-19920-1-git-send-email-linux@rasmusvillemoes.dk> Sender: linux-kbuild-owner@vger.kernel.org List-ID: To: Michal Marek Cc: linux-kbuild@vger.kernel.org, Rasmus Villemoes The current checkstack.pl script has a few problems, stemming from the overly simplistic attempt at parsing objdump output with regular expresions. Since gcc 4.6 introduced the -fstack-usage option, we can now get the exact stack use instead of resorting to ad hoc methods. This introduces two small scripts. One for running make with KCFLAGS set to -fstack-usage, followed by collecting the generated .su files in a single output file. Another for taking two such output files and computing the changes in stack use. 2/4 and 3/4 may be too small by themselves; they can easily be squashed into 1/4. v2: Use KCFLAGS instead of EXTRA_CFLAGS. A few more details in commit messages. Simpler option handling in stackusage. Removed accidental leftover debug prints. Rasmus Villemoes (4): scripts: add stackusage script .gitignore: add *.su pattern kbuild: remove *.su files generated by -fstack-usage scripts: add stackdelta script .gitignore | 1 + Makefile | 1 + scripts/stackdelta | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ scripts/stackusage | 33 ++++++++++++++++++++++++++++++ 4 files changed, 94 insertions(+) create mode 100755 scripts/stackdelta create mode 100755 scripts/stackusage -- 2.1.3