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}"
:55 +0100'>2017-11-02License cleanup: add SPDX GPL-2.0 license identifier to files with no licenseGreg Kroah-Hartman 2017-07-08Merge tag 'pci-v4.13-changes' of git://git.kernel.org/pub/scm/linux/kernel/gi...Linus Torvalds 2017-06-22genirq/affinity: Assign vectors to all present CPUsChristoph Hellwig 2017-05-22PCI/MSI: Ignore affinity if pre/post vector count is more than min_vecsMichael Hernandez 2017-04-20genirq/affinity: Fix calculating vectors to assignKeith Busch 2017-04-13irq/affinity: Fix extra vecs calculationKeith Busch 2017-04-04irq/affinity: Fix CPU spread for unbalanced nodesKeith Busch 2016-12-15genirq/affinity: Fix node generation from cpumaskGuilherme G. Piccoli 2016-11-16genirq/affinity: Use default affinity mask for reserved vectorsThomas Gleixner 2016-11-16genirq/affinity: Take reserved vectors into account when spreading irqsChristoph Hellwig 2016-11-09genirq/affinity: Handle pre/post vectors in irq_create_affinity_masks()Christoph Hellwig 2016-11-09genirq/affinity: Handle pre/post vectors in irq_calc_affinity_vectors()Christoph Hellwig 2016-09-14genirq/affinity: Remove old irq spread infrastructureThomas Gleixner 2016-09-14genirq/affinity: Provide smarter irq spreading infrastructureThomas Gleixner 2016-08-22genirq/affinity: Use get/put_online_cpus around cpumask operationsChristoph Hellwig 2016-07-04genirq: Add a helper to spread an affinity mask for MSI/MSI-X vectorsChristoph Hellwig