Re: Wrong Perf Backtraces
ahmadkhorrami <[email protected]>
| Newsgroups | org.kernel.vger.linux-trace-users |
|---|---|
| Message-ID | <[email protected]> |
Hi, Thanks Milian. So if I am right, I should do the following: 1) Run "perf buildid-list" and catch all the <file path, build-ids> pairs. 2) First check for the existence of the file path. 3) If failed, concatenate "~/.debug", file path, "/" and buildid and use it as the alternative. I thought that GDB is smart enough to detect these situations in the same way that it detects debug info files. Should I check any directory other than ~/.debug? Regards. On 2020-03-27 16:40, Milian Wolff wrote: > On Freitag, 27. März 2020 12:04:20 CET ahmadkhorrami wrote: > >> I do the following: >> If this line is in the perf script backtrace: >> 7f21ffe256db g_main_context_iteration+0x2b >> (/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.5600.4) >> I run the following command: >> gdb -batch -ex 'file >> /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.5600.4' >> -ex 'disass g_main_context_iteration'. > > You can try to parse the output of `perf buildid-list` to get a mapping > that > can be used to run this on another person's machine. E.g. > > ``` > $ perf buildid-list > 5837b1e7495db791f9a3a56fb6ca29958da75b0c [kernel.kallsyms] > 845f98f6a3019620c37a2f611b2f20c27de83d5b > /home/milian/projects/kdab/rnd/ > hotspot/build/tests/test-clients/cpp-parallel/cpp-parallel > f6ca5853dae87d9f0503a9ef230f6d1fa15a832d /usr/lib/ld-2.30.so > 92883b06055e8e21ded8eb0cd5a61f5704531152 [vdso] > 8b04d1825b63d9a600e3d57ac71058935e7ad757 /usr/lib/libpthread-2.30.so > 09639b80a8fad179004f2484608764d2b336dd4a /usr/lib/libstdc++.so.6.0.27 > 33d1f350f13728651d74dd2a56bad1e4e4648f5e /usr/lib/libc-2.30.so > $ file > ~/.debug/usr/lib/ld-2.30.so/f6ca5853dae87d9f0503a9ef230f6d1fa15a832d/ > elf > /home/milian/.debug/usr/lib/ld-2.30.so/ > f6ca5853dae87d9f0503a9ef230f6d1fa15a832d/elf: ELF 64-bit LSB shared > object, > x86-64, version 1 (SYSV), statically linked, > BuildID[sha1]=f6ca5853dae87d9f0503a9ef230f6d1fa15a832d, not stripped > ``` > > I'm afraid to say that I currently don't have the time required to be > of more > help in debugging this issue in general. > > Good luck!