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}"
d>Anton Ivanov 2018-02-09mconsole_proc(): don't mess with file->f_posAl Viro 2017-11-27um: annotate ->poll() instancesAl Viro 2017-11-04Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller 2017-11-02License cleanup: add SPDX GPL-2.0 license identifier to files with no licenseGreg Kroah-Hartman 2017-10-18um: net: Convert timers to use timer_setup()Kees Cook 2017-09-04mconsole: switch to kernel_readChristoph Hellwig 2017-07-15Merge branch 'for-linus-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kerne...Linus Torvalds 2017-07-05um: console: Ignore console= optionMasami Hiramatsu 2017-06-09block: introduce new block status code typeChristoph Hellwig 2017-03-02sched/headers: Prepare for new header dependencies before moving code to <lin...Ingo Molnar 2017-03-02sched/headers: Prepare to move signal wakeup & sigpending methods from <linux...Ingo Molnar 2017-03-02sched/headers: Prepare for new header dependencies before moving code to <lin...Ingo Molnar 2017-01-14sched/core: Remove set_task_state()Davidlohr Bueso 2016-12-24Replace <asm/uaccess.h> with <linux/uaccess.h> globallyLinus Torvalds 2016-12-16Merge branch 'for-linus-4.10-rc1' of git://git.kernel.org/pub/scm/linux/kerne...Linus Torvalds 2016-12-14um: UBD ImprovementsAnton Ivanov 2016-10-20net: use core MTU range checking in misc driversJarod Wilson 2016-08-31miscdevice: Use module_misc_device() macroPrasannaKumar Muralidharan 2016-06-22um: track 'parent' device in a local variableDan Williams 2016-06-07block, drivers: add REQ_OP_FLUSH operationMike Christie 2016-05-17Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-nextLinus Torvalds 2016-05-04treewide: replace dev->trans_start update with helperFlorian Westphal 2016-04-12um: switch to using blk_queue_write_cache()Jens Axboe 2016-03-22fs/coredump: prevent fsuid=0 dumps into user-controlled directoriesJann Horn 2016-01-12Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/vir...Linus Torvalds 2016-01-10um: Update UBD to use pread/pwrite family of functionsAnton Ivanov 2016-01-04[um] mconsole: don't open-code memdup_user_nul()Al Viro 2016-01-04[um] hostaudio: don't open-code memdup_user()Al Viro