perf symbols: we can now read separate debug-info files based on a build ID
authorDima Kogan <dima@secretsauce.net>
Tue, 8 Sep 2015 00:34:19 +0000 (17:34 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 28 Oct 2015 13:04:27 +0000 (10:04 -0300)
commit5baecbcd9c9a2f491afe1369fc22e7363f9c94d5
treed1cef0708054d9cbbd96c7c23a2795910bcbea3c
parentf2f3096888569ff1fc15fa0187a39eef3a24b28e
perf symbols: we can now read separate debug-info files based on a build ID

Recent GDB (at least on a vanilla Debian box) looks for debug information in

  /usr/lib/debug/.build-id/nn/nnnnnnn

where nn/nnnnnn is the build-id of the stripped ELF binary. This is
documented here:

  https://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html

This was not working in perf because we didn't read the build id until
AFTER we searched for the separate debug information file. This patch
reads the build ID and THEN does the search.

Signed-off-by: Dima Kogan <dima@secretsauce.net>
Link: http://lkml.kernel.org/r/87si6pfwz4.fsf@secretsauce.net
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/symbol.c