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}"
7f80a826fc3153a'>PM / OPP: Move the OPP directory out of power/Viresh Kumar 2017-06-03mux: minimal mux subsystemPeter Rosin 2017-03-09tee: generic TEE subsystemJens Wiklander 2017-02-10drivers/fsi: Add empty fsi bus definitionsJeremy Kerr 2016-05-23Merge tag 'libnvdimm-for-4.7' of git://git.kernel.org/pub/scm/linux/kernel/gi...Linus Torvalds 2016-05-20/dev/dax, pmem: direct access to persistent memoryDan Williams 2016-04-29dma-buf/sync_file: de-stage sync_fileGustavo Padovan 2015-11-04Merge tag 'char-misc-4.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/gi...Linus Torvalds 2015-10-29lightnvm: Support for Open-Channel SSDsMatias Bjørling 2015-10-09nvme: move to a new drivers/nvme/host directoryJay Sternberg 2015-10-07add FPGA manager coreAlan Tull 2015-10-04intel_th: Add driver infrastructure for Intel(R) Trace Hub devicesAlexander Shishkin 2015-10-04stm class: Introduce an abstraction for System Trace Module devicesAlexander Shishkin 2015-09-03Merge branch 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-armLinus Torvalds