summaryrefslogtreecommitdiff
path: root/scripts/objdump-func
blob: 7b15b873d0e2a2227ed3df72c16feb543a3f91f2 (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
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0
#
# Disassemble a single function.
#
# usage: objdump-func <file> <func> [<func> ...]

set -o errexit
set -o nounset

OBJDUMP="${CROSS_COMPILE:-}objdump"

command -v gawk >/dev/null 2>&1 || die "gawk isn't installed"

usage() {
	echo "usage: objdump-func <file> <func> [<func> ...]" >&2
	exit 1
}

[[ $# -lt 2 ]] && usage

OBJ=$1; shift
FUNCS=("$@")

${OBJDUMP} -wdr $OBJ | gawk -M -v _funcs="${FUNCS[*]}" '
	BEGIN { split(_funcs, funcs); }
	/^$/ { func_match=0; }
	/<.*>:/ {
		f = gensub(/.*<(.*)>:/, "\\1", 1);
		for (i in funcs) {
			# match compiler-added suffixes like ".cold", etc
			if (f ~ "^" funcs[i] "(\\..*)?") {
				func_match = 1;
				base = strtonum("0x" $1);
				break;
			}
		}
	}
	{
		if (func_match) {
			addr = strtonum("0x" $1);
			printf("%04x ", addr - base);
			print;
		}
	}'
fca0ce368c707fd090e0324f3ba40931d0a'>virtio-balloon: kzalloc the vb structWei Wang 2018-08-22virtio-balloon: remove BUG() in init_vqsWei Wang 2018-07-30virtio_balloon: fix another race between migration and ballooningJiang Biao 2018-04-10virtio_balloon: export hugetlb page allocation countsJonathan Helman 2018-01-31virtio_balloon: include disk/file caches memory statisticsTomáš Golembiovský 2017-12-01virtio_balloon: fix increment of vb->num_pfns in fill_balloon()Jan Stancek 2017-11-14virtio_balloon: fix deadlock on OOMMichael S. Tsirkin 2017-07-25virtio-balloon: coding format cleanupWei Wang 2017-07-25virtio-balloon: deflate via a page listLiang Li 2017-06-18virtio_balloon: disable VIOMMU supportMichael S. Tsirkin 2017-05-02virtio: wrap find_vqsMichael S. Tsirkin 2017-03-28virtio_balloon: prevent uninitialized variable useArnd Bergmann 2017-03-28virtio-balloon: use actual number of stats for stats queue buffersLadi Prosek 2017-03-28virtio_balloon: init 1st buffer in stats vqLadi Prosek 2017-03-03Merge branch 'WIP.sched-core-for-linus' of git://git.kernel.org/pub/scm/linux...Linus Torvalds 2017-03-02Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhostLinus Torvalds 2017-03-02sched/headers: Prepare to remove the <linux/magic.h> include from <linux/sche...Ingo Molnar 2017-02-27virtio: allow drivers to request IRQ affinity when creating VQsChristoph Hellwig 2017-02-24mm balloon: umount balloon_mnt when removing vb deviceYisheng Xie 2016-10-31virtio: update balloon size in balloon "probe"Konstantin Neumoin 2016-08-06Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhostLinus Torvalds 2016-08-01balloon: check the number of available pages in leak balloonKonstantin Neumoin 2016-07-26mm: fix build warnings in <linux/compaction.h>Minchan Kim 2016-07-26mm: balloon: use general non-lru movable page featureMinchan Kim 2016-05-22virtio_balloon: fix PFN format for virtio-1Michael S. Tsirkin 2016-03-20Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhostLinus Torvalds 2016-03-17virtio_balloon: export 'available' memory to balloon statisticsIgor Redko 2016-03-11virtio_balloon: Allow to resize and update the balloon stats in parallelPetr Mladek 2016-03-11virtio_balloon: Use a workqueue instead of "vballoon" kthreadPetr Mladek 2016-01-12virtio: make find_vqs() checkpatch.pl-friendlyStefan Hajnoczi 2016-01-12virtio_balloon: fix race by fill and leakMinchan Kim 2015-09-08virtio_balloon: do not change memory amount visible via /proc/meminfoDenis V. Lunev 2015-09-08virtio_ballon: change stub of release_pages_by_pfnDenis V. Lunev