All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
To: Michal Marek <mmarek@suse.cz>
Cc: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>
Subject: [PATCH v3 0/4] scripts: add stack{usage,delta} scripts
Date: Thu, 20 Aug 2015 11:53:26 +0200	[thread overview]
Message-ID: <1440064410-13515-1-git-send-email-linux@rasmusvillemoes.dk> (raw)
In-Reply-To: <55D48FB9.50605@suse.cz>

On Wed, Aug 19 2015, Michal Marek <mmarek@suse.cz> wrote:

> Do you plan any new iterations, or is this final despite the [RFC]?
> If it's final, I will apply it.

It's final, modulo a few typos I spotted. I took the opportunity to
fix those and send with a PATCH prefix.

===

The current checkstack.pl script has a few problems, stemming from the
overly simplistic attempt at parsing objdump output with regular
expressions. 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.

v3: Fix a few typos.

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


  reply	other threads:[~2015-08-20  9:53 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-21  1:10 [RFC 0/4] scripts: add stack{usage,delta} scripts Rasmus Villemoes
2015-06-21  1:10 ` [RFC 1/4] scripts: add stackusage script Rasmus Villemoes
2015-06-21  1:10   ` Rasmus Villemoes
2015-06-23 13:53   ` Michal Marek
2015-06-25  8:04     ` Rasmus Villemoes
2015-06-21  1:10 ` [RFC 2/4] .gitignore: add *.su pattern Rasmus Villemoes
2015-06-21  1:10   ` Rasmus Villemoes
2015-06-21  1:10 ` [RFC 3/4] kbuild: remove *.su files generated by -fstack-usage Rasmus Villemoes
2015-06-21  1:10   ` Rasmus Villemoes
2015-06-21  1:10 ` [RFC 4/4] scripts: add stackdelta script Rasmus Villemoes
2015-06-21  1:10   ` Rasmus Villemoes
2015-06-22  7:39   ` Rasmus Villemoes
2015-06-22  7:39     ` Rasmus Villemoes
2015-06-25  8:21 ` [RFC v2 0/4] scripts: add stack{usage,delta} scripts Rasmus Villemoes
2015-06-25  8:21   ` [RFC v2 1/4] scripts: add stackusage script Rasmus Villemoes
2015-06-25  8:21   ` [RFC v2 2/4] .gitignore: add *.su pattern Rasmus Villemoes
2015-06-25  8:21   ` [RFC v2 3/4] kbuild: remove *.su files generated by -fstack-usage Rasmus Villemoes
2015-06-25  8:21   ` [RFC v2 4/4] scripts: add stackdelta script Rasmus Villemoes
2015-08-19 14:16   ` [RFC v2 0/4] scripts: add stack{usage,delta} scripts Michal Marek
2015-08-20  9:53     ` Rasmus Villemoes [this message]
2015-08-20  9:53       ` [PATCH v3 1/4] scripts: add stackusage script Rasmus Villemoes
2015-08-20  9:53       ` [PATCH v3 2/4] .gitignore: add *.su pattern Rasmus Villemoes
2015-08-20  9:53       ` [PATCH v3 3/4] kbuild: remove *.su files generated by -fstack-usage Rasmus Villemoes
2015-08-20  9:53       ` [PATCH v3 4/4] scripts: add stackdelta script Rasmus Villemoes
2015-08-28 15:05       ` [PATCH v3 0/4] scripts: add stack{usage,delta} scripts Michal Marek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1440064410-13515-1-git-send-email-linux@rasmusvillemoes.dk \
    --to=linux@rasmusvillemoes.dk \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.