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}"
distro/kernel/commit/include/kunit?h=linux-rolling-stable&id=4b59300ba4d2362b02c2a9077047bbabceea67d7'>kunit: Add parent kunit for parameterized test contextMarie Zhussupova 2025-08-11kunit, lib/crypto: Move run_irq_test() to common headerEric Biggers 2025-07-29Merge tag 'linux_kselftest-kunit-6.17-rc1' of git://git.kernel.org/pub/scm/li...Linus Torvalds 2025-07-16kunit: test: Export kunit_attach_mm()Tiffany Yang 2025-06-24kunit: Adjust kunit_test timeout based on test_{suite,case} speedUjwal Jain 2025-05-30Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cl...Linus Torvalds 2025-05-06clk: test: Forward-declare struct of_phandle_args in kunit/clk.hRichard Fitzgerald 2025-04-08kunit: Spelling s/slowm/slow/Geert Uytterhoeven 2025-02-18kunit: Clarify kunit_skip() argument nameKevin Brodsky 2025-01-22Merge tag 'linux_kselftest-kunit-6.14-rc1' of git://git.kernel.org/pub/scm/li...Linus Torvalds 2025-01-15kunit: Introduce autorun optionStanislav Kinsburskii 2025-01-11kunit: platform: Resolve 'struct completion' warningBrian Norris 2024-12-02module: Convert symbol namespace to string literalPeter Zijlstra 2024-11-22Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cl...Linus Torvalds 2024-11-19kunit: skb: add gfp to kernel doc for kunit_zalloc_skb()Dan Carpenter 2024-11-11kunit: skb: use "gfp" variable instead of hardcoding GFP_KERNELDan Carpenter