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}"
r>2015-11-03ide: pdc202xx_new: Replace timeval with ktime_tAmitoj Kaur Chawla 2015-07-01Merge tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kern...Linus Torvalds 2015-06-25Merge branch 'for-4.2/core' of git://git.kernel.dk/linux-blockLinus Torvalds 2015-05-28kernel/params: constify struct kernel_param_ops usesLuis R. Rodriguez 2015-05-11Merge branch 'for-4.1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git...Linus Torvalds 2015-05-05block: move PM request support to IDEChristoph Hellwig 2015-05-05block: move REQ_TYPE_SENSE to the ide driverChristoph Hellwig 2015-05-05block: rename REQ_TYPE_SPECIAL to REQ_TYPE_DRV_PRIVChristoph Hellwig 2015-04-17ide: remove deprecated use of pci apiQuentin Lambert 2015-04-16Merge tag 'powerpc-4.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mp...Linus Torvalds 2015-04-14Merge tag 'pm+acpi-4.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/...Linus Torvalds 2015-04-14Remove celleb-only SCC PATA driversDaniel Axtens 2015-04-13Merge branch 'for-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/li...Linus Torvalds 2015-04-13Merge branch 'pnp'Rafael J. Wysocki 2015-03-27ide,ata: Rename ATA_IDX to ATA_SENSEHannes Reinecke 2015-03-23powerpc: Move Power Macintosh drivers to generic byteswappersDavid Gibson 2015-03-18ide_tape: convert jiffies with jiffies_to_msecsNicholas Mc Guire 2015-03-18PNP: ide/ide-pnp: Use module_pnp_driver to register driverPeter Huewe