perf buildid-list: Support showing the build id in an ELF file
authorArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 29 Aug 2011 11:33:17 +0000 (08:33 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 29 Sep 2011 19:41:37 +0000 (16:41 -0300)
commit7a6f205d623afaf05aee387aa6bc57fa43421061
tree30c3976fd7f4e028c6c3b7819e26a3db4059fbec
parentf2add9cd66c87baea6762b099ee38ee742207699
perf buildid-list: Support showing the build id in an ELF file

Try first reading the build id, validating that it is an ELF file, etc.
Cheap as libelf will bail out as soon as the magic number check fails.

Useful when investigating debuginfo packaging problems like this one:

[root@emilia ~]# perf buildid-list -i /usr/lib/debug/lib/modules/`uname -r`/vmlinux
77bb4ea591a602d455ace759a377c9adfff1aba3
[root@emilia ~]# perf buildid-list -k
07b0c016a2b30004e86132d0239945b1e88f5d75
[root@emilia ~]#

Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-4elot9oxwa0rr0d90dshca3a@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/Documentation/perf-buildid-list.txt
tools/perf/builtin-buildid-list.c