[Bug 608775] [NEW] tools/perf: Symbol loading problems in perf report

Dave Martin Dave.Martin at arm.com
Thu Jul 22 14:39:23 UTC 2010


Public bug reported:

Affected: linux 2.6.35-10.15
Architecture: all

 * When perf report loads symbols from an image that is in the
current directory or a subdirectory of the current directory, perf
report abbreviates the current directory part of the path to "./".
This happens independently of the directory perf record was run in.

 * For Ubuntu, perf report searches for debug symbols in
/usr/lib/debug<path>.  This works when <path> is absolute, but fails
to work if the path of an image has been abbreviated, as above.

So, for example:

If I have the debug symbols for bash in /usr/lib/debug/bin/bash:

/bin$ perf record bash -c 'while :; do :; done& sleep 5; kill $!'
/bin$ perf report

...then perf report fails to find the debug symbols for bash (because
it searches in /usr/lib/debug./bash)

A simple workaround is to change to any directory which is not a
direct parent of the affected images before running perf report:

/bin$ cd /tmp
/tmp$ perf report -i /bin/perf.data

The affected code is at:

tools/perf/util/map.c:map__new():55

tools/perf/util/symbol.c:dso__load():1334


One possible fix is simply to remove the current directory
abbreviation for names of loaded images - this makes some sense,
because the absolute path of each image is needed to form the correct
path under /usr/lib/debug for the separated debug image (possible patch attached).
 Otherwise, the absolute path would need to be tracked separately, in
addition to the abbreviated path used for displaying in the report.

** Affects: linux (Ubuntu)
     Importance: Undecided
         Status: New

-- 
tools/perf: Symbol loading problems in perf report
https://bugs.launchpad.net/bugs/608775
You received this bug notification because you are a member of Kernel
Bugs, which is subscribed to linux in ubuntu.




More information about the kernel-bugs mailing list