5

When running perf it finds the kernel symbols and symbols of my program but it does not find external module symbols. I have written a kernel module which I load using insmod how can I tell perf to find its symbols as well?

I am running a 2.6.37.6 kernel (can't upgrade), my perf does not yet support the dwarf option but I think its a symbol issue. I have compiled everything with -g -fno-omit-frame-pointer

osgx
  • 90,338
  • 53
  • 357
  • 513
hlitz
  • 635
  • 6
  • 24
  • You can get perf from newer kernel (already compiled or compile yourself) and use it on older kernel. Sometimes this will work and provide you additional capabilities like dwarf option. – osgx Apr 08 '14 at 01:19

1 Answers1

5

I had to make it a kernel module, then perf could find its symbols:

IN_TREE_DIR=/lib/modules/`uname -r`/kernel/modulename
mkdir -p $IN_TREE_DIR
cp modulename.ko $IN_TREE_DIR
depmod -a 
hlitz
  • 635
  • 6
  • 24