2

I have Ubuntu 14.04 with Linux-3.14.3-rt51 kernel. I need to use Systemtap so I compiled my kernel with the following options chosen during make menuconfig:

General setup
[*] Kprobes
[*] Kernel->user space relay support (formerly relayfs)

Kernel hacking
[*] Debug Filesystem
[*] Kernel debugging
[*] Compile the kernel with debug info

But when I run stap -v -e 'probe vfs.read {printf("read performed\n"); exit()}' on my kernel, I see the following warnings:

WARNING: cannot find module nfs debuginfo: No DWARF information found [man warning::debuginfo]
WARNING: cannot find module sunrpc debuginfo: No DWARF information found [man warning::debuginfo]  

What is wrong? Can anyone help me?

Aravona
  • 161
RaSha
  • 133

2 Answers2

1

If you just need kernel symbols to run systemtap, easiest way is to install the dbgsym package for your kernel, it'll be a lot less painful than recompiling the whole kernel yourself:

Head over to How to install Ubuntu kernel debug symbols.

If there's no matching dbgsym package you might need to upgrade your kernel.
See apt-cache search 'linux-image.*dbgsym' for current list of kernels with debug symbols.

lemonsqueeze
  • 1,634
0

How are you installing this custom kernel onto you system? And what exact CONFIG parameters are using?

If you use the stock Ubuntu kernel you can follow the following steps to use Systemtap: https://wiki.ubuntu.com/Kernel/Systemtap

For custom kernel installations you may need to ensure debug symbols are in a place that Systemtap knows to check. If you build the kernel using make deb-pkgfor example, it will produce a linux-image-$KVER-dbg package which can be installed to properly install debuginfo symbols.

Chris
  • 431
  • I used [1] instructions to install my custom kernel. How can I extract the exact CONFIG parameters of a installed kernel? Thanks. [1] https://bitbucket.org/thismaechler/ubuntustudio-14.04-realtimeaudio/src/74adbac5418c2bad6d52c2cd296f223c82d21649/rt-kernel/HOWTO?at=master&fileviewer=file-view-default – RaSha Jan 18 '16 at 07:33