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}"
master&id=4f3c8320c78cdd11c8fdd23c33787407f719322e'>Documentation: features: remove c6x referencesArnd Bergmann 2020-07-01arch: remove unicore32 portMike Rapoport 2020-05-25Documentation/features: Refresh the arch support status filesBjörn Töpel 2019-01-07Documentation/features: Add csky kernel featuresGuo Ren 2018-12-06arch: switch the default on ARCH_HAS_SG_CHAINChristoph Hellwig 2018-06-04Merge tag 'docs-4.18' of git://git.lwn.net/linuxLinus Torvalds 2018-05-08Documentation/features: Refresh the arch support status files in placeAndrea Parri 2018-05-08dma-debug: remove CONFIG_HAVE_DMA_API_DEBUGChristoph Hellwig 2018-03-26Documentation: arch-support: remove obsolete architecturesArnd Bergmann 2018-03-09mn10300: Remove the architectureDavid Howells 2018-02-22docs: Remove remaining references to metagJames Hogan 2017-05-01docs: remove all references to AVR32 architectureHans-Christian Noren Egtvedt 2016-12-23Merge tag 'arc-4.10-rc1-part2' of git://git.kernel.org/pub/scm/linux/kernel/g...Linus Torvalds 2016-12-18ARC: enable SG chainingVladimir Kondratiev 2016-12-15xtensa: update DMA-related Documentation/features entriesMax Filippov 2016-01-20dma-mapping: always provide the dma_map_ops based implementationChristoph Hellwig 2015-06-03Documentation/features/io: Add feature description and arch support status fi...Ingo Molnar 2015-06-03Documentation/features/io: Add feature description and arch support status fi...Ingo Molnar 2015-06-03Documentation/features/io: Add feature description and arch support status fi...Ingo Molnar 2015-06-03Documentation/features/io: Add feature description and arch support status fi...Ingo Molnar