Kristian Köhntopp has a wonderful article about using oprofile to track down problems in running programs. I thought I'd add a few thoughts.
If you need to get a vmlinux kernel on redhat, apparently you just need to install kernel-debuginfo, which will provide a vmlinux image you can profile against.
If you are using debian, unfortunately there is no package I
could find to allow you to get a vmlinux. so what I did
was:
($kver isn't a real variable - it's your kernel version. tab
completion probably comes in handy at some point)
- Install linux-tree-$kver - which gets you the debian kernel sources
- Unpack the tar.bz2 file that is now in /usr/src
- Copy /boot/config-$kver to /usr/src/linux-$kver/.config
- cd /usr/src/linux-$kver
- make oldconfig
- make prepare …