This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Build IDs for finding packages


Em Mon, Jan 28, 2013 at 05:11:56PM +0000, Bruce Dawson escreveu:
> To be clear, the scenario that I am most interested in -- the
> challenging scenario which is not currently addressed and which build
> IDs could address -- is downloading symbols on my machine for a
> package that is installed on someone else's machine. This is necessary
> when analyzing core files or breakpad crashes coming from customers on
> a wide range of distributions.

The support in the 'perf' tools is as follows:

[root(a)sandy ~]# perf record usleep 10
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.019 MB perf.data (~828 samples) ]
[root(a)sandy ~]# perf buildid-list
360150b62389f94d055fd030aa698602da69d089 [kernel.kallsyms]
d6bd776b36dac438642cf84b282956738727901d /lib64/ld-2.12.so
[root(a)sandy ~]# ls -la ~/.debug/.build-id/d6/bd776b36dac438642cf84b282956738727901d 
lrwxrwxrwx. 1 root root 63 Aug  2 14:58 /root/.debug/.build-id/d6/bd776b36dac438642cf84b282956738727901d -> ../../lib64/ld-2.12.so/d6bd776b36dac438642cf84b282956738727901d
[root(a)sandy ~]# ls -la ~/.debug/lib64/ld-2.12.so/
total 476
drwxr-xr-x.  2 root root   4096 Aug  2 14:58 .
drwxr-xr-x. 61 root root   4096 Nov 26 17:50 ..
-rwxr-xr-x.  1 root root 156872 Jan 19  2012 39c39fb43da880c5c40b303a6967c0e93ac4716c
-rwxr-xr-x.  1 root root 156872 Mar  2  2012 ceb82e745b0ab8bb7ea28c068327be1fb068c923
-rwxr-xr-x.  1 root root 156872 Jul  4  2012 d6bd776b36dac438642cf84b282956738727901d
[root(a)sandy ~]# perf archive
Now please run:

$ tar xvf perf.data.tar.bz2 -C ~/.debug

wherever you need to run 'perf report' on.
[root(a)sandy ~]# tar tvf perf.data.tar.bz2 
lrwxrwxrwx root/root         0 2013-01-10 12:15 .build-id/36/0150b62389f94d055fd030aa698602da69d089 -> ../../[kernel.kallsyms]/360150b62389f94d055fd030aa698602da69d089
-rw-r--r-- root/root   4252240 2013-01-10 12:15 [kernel.kallsyms]/360150b62389f94d055fd030aa698602da69d089
lrwxrwxrwx root/root         0 2012-08-02 14:58 .build-id/d6/bd776b36dac438642cf84b282956738727901d -> ../../lib64/ld-2.12.so/d6bd776b36dac438642cf84b282956738727901d
-rwxr-xr-x root/root    156872 2012-07-04 02:03 lib64/ld-2.12.so/d6bd776b36dac438642cf84b282956738727901d
[root(a)sandy ~]#

Right now we have to, at the end of the 'perf record' session, traverse the
generated perf.data files looking for DSOs that had samples, and then
generating a header with the build-ids.

This has issues with long running sessions where updates can take place and
also there is this overhead at the end of the session, so one item in the
'perf' TODO list[1] is to add the build-id to the PERF_RECORD_MMAP event to fix
this.

- Arnaldo

[1] https://perf.wiki.kernel.org/index.php/Todo

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]