tools/perf: Symbol loading problems in perf report
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Fix Released
|
Low
|
Andy Whitcroft | ||
Maverick |
Invalid
|
Low
|
Unassigned |
Bug Description
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/
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/
/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/
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/
tools/perf/
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.
tags: | added: patch |
tags: | added: kj-triage |
Changed in linux (Ubuntu): | |
status: | New → Fix Committed |
assignee: | nobody → Andy Whitcroft (apw) |
Changed in linux (Ubuntu Maverick): | |
importance: | Undecided → Low |
Changed in linux (Ubuntu): | |
importance: | Undecided → Low |
Changed in linux (Ubuntu Maverick): | |
status: | New → Triaged |
Exchanged mails with Arnaldo Carvalho de Melo, who is involved in upstream maintenance of the perf tools:
Arnaldo Carvalho de Melo <acme at redhat.com> wrote:
Em Thu, Jul 22, 2010 at 09:07:04AM +0100, Dave Martin escreveu:
[...]
Your analysis seems correct, I guess we should store the absolute path
and only at report time strip the current directory, will look into
that.
[...]