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}"
href='/distro/kernel/commit/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts?h=linux-6.6.y&id=60d9c3a838d3d96f063f32aedddac7793409909d'>ARM: sun5i: A10s: Switch the EMAC pins indicesMaxime Ripard 2016-12-26ARM: sunxi: Convert pinctrl nodes to generic bindingsMaxime Ripard 2016-12-26ARM: sunxi: Remove useless allwinner,pull propertyMaxime Ripard 2016-12-26ARM: sunxi: Remove useless allwinner,drive propertyMaxime Ripard 2016-11-22ARM: sun5i: Rename A10s pinsMaxime Ripard 2016-07-04ARM: dts: sun5i: add spi2 on A10s Olinuxino MicroMichal Suchanek 2015-09-27dts: sunxi: correct vendor prefix on OLinuXino a10s microOlliver Schinagl 2015-07-31ARM: dts: sun5i: Enable USB DRC on A10s OLinuxIno MicroHans de Goede 2015-07-09ARM: dts: A10s-OLinuxIno: Add a node for axp152 pmicMichal Suchanek 2015-06-01ARM: dts: sun5i: Add A10s and A13 SRAM and SRAM controllerMaxime Ripard 2015-05-10ARM: sunxi: dt: Remove the FSF addressMaxime Ripard 2015-04-27ARM: sunxi: DT: Add stdout-path propertyMaxime Ripard 2015-04-27ARM: sun5i: a10s: olinuxino micro: Convert to DT label based syntaxMaxime Ripard