summaryrefslogtreecommitdiff
path: root/scripts/stackusage
blob: 56ef1ab670acc06700bf92fc322e0ae87831c511 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0

outfile=""
now=`date +%s`

while [ $# -gt 0 ]
do
    case "$1" in
        -o)
	    outfile="$2"
	    shift 2;;
	-h)
	    echo "usage: $0 [-o outfile] <make options/args>"
	    exit 0;;
	*)  break;;
    esac
done

if [ -z "$outfile" ]
then
    outfile=`mktemp --tmpdir stackusage.$$.XXXX`
fi

KCFLAGS="${KCFLAGS} -fstack-usage" make "$@"

# Prepend directory name to file names, remove column information,
# make file:line/function/size/type properly tab-separated.
find . -name '*.su' -newermt "@${now}" -print |                     \
    xargs perl -MFile::Basename -pe                                 \
        '$d = dirname($ARGV); s#([^:]+:[0-9]+):[0-9]+:#$d/$1\t#;' | \
    sort -k3,3nr > "${outfile}"

echo "$0: output written to ${outfile}"
an title='2008-12-03 21:32:03 +0100'>2008-12-03kbuild: gen_init_cpio expands shell variables in file namesSally, Gene 2007-07-16kbuild: add support for reading stdin with gen_init_cpioMike Frysinger 2007-07-16.gitignore updateAlexey Dobriyan 2007-05-02usr/Kconfig: fix typoAlexander E. Patrakov 2007-02-11[PATCH] usr/gen_init_cpio.c: support for hard linksLuciano Rocha 2007-02-11[PATCH] disable init/initramfs.cJean-Paul Saman 2006-11-25[PATCH] initramfs: handle more than one source dir or file listThomas Chou 2006-09-25kbuild: consistently decide when to rebuild a targetSam Ravnborg 2006-08-07kbuild: do not try to build content of initramfsSam Ravnborg 2006-06-10kbuild: bugfix with initramfsNickolay 2006-04-19[PATCH] Fix potential NULL pointer deref in gen_init_cpioJesper Juhl 2006-04-11kbuild: rebuild initramfs if content of initramfs changesSam Ravnborg