[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#672490: linux-tools: perf has wrong default lookup path



Package: linux-tools
Version: 3.2+44
Severity: normal


The default lookup path of perf does not align with the debian install
paths.

A simple command execution fails:

rrs@champaran:~$ sudo perf probe -L vfs_read
Failed to find path of kernel module.
Failed to open debuginfo file.
  Error: Failed to show lines. (-2)


The lookup path for debuginfo is:
stat("/lib/modules/3.3.0-trunk-amd64/kernel/.", {st_mode=S_IFDIR|0755,
st_size=4096, ...}) = 0
getdents(3, /* 0 entries */, 32768)     = 0
close(3)                                = 0
open("/root/.debug/.build-id/3d/849bc6ecd394dc55a22756b1da531a7b856d03",
O_RDONLY) = -1 ENOENT (No such file or directory)
open("vmlinux", O_RDONLY)               = -1 ENOENT (No such file or
directory)
open("/boot/vmlinux", O_RDONLY)         = -1 ENOENT (No such file or
directory)
open("/boot/vmlinux-3.3.0-trunk-amd64", O_RDONLY) = -1 ENOENT (No such
file or directory)
open("/lib/modules/3.3.0-trunk-amd64/build/vmlinux", O_RDONLY) = -1
ENOENT (No such file or directory)
open("/usr/lib/debug/lib/modules/3.3.0-trunk-amd64/vmlinux", O_RDONLY) =
-1 ENOENT (No such file or directory)
write(2, "Failed to find path of kernel mo"..., 38Failed to find path of
kernel module.
) = 38
write(2, "Failed to open debuginfo file.\n", 31Failed to open debuginfo
file.



The vmlinux file resides under as /usr/lib/debug/boot/vmlinux-`uname -r`
Adding a symlink works. So the path lookup needs to be fixed here.




Similary for the source lookup:

access("/build/buildd-linux-2.6_3.3.4-1~experimental.1-amd64-_y3OdD/linux-2.6-3.3.4/debian/build/source_amd64_none/fs/read_write.c",
R_OK) = -1 ENOENT (No such file or directory)
write(2, "Failed to find source file. (-2)"..., 33Failed to find source
file. (-2)
) = 33
write(2, "  Error: Failed to show lines. ("..., 36  Error: Failed to
show lines. (-2)


It should try for: /usr/src/linux-source-`uname -r`



Where do you think this work needs to be put at?
>From the last time, for SystemTap, I remember doing it right during
build (DBUG: 555549).



Ofcourse, all works if the user explicitly provides the arguemnts to the
-k and -s options.




-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (100, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.3.0-trunk-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages linux-tools depends on:
ii  linux-tools-3.2  3.2.7-2

linux-tools recommends no packages.

linux-tools suggests no packages.

-- no debconf information



Reply to: