Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

perf cannot find external module symbols

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

like image 860
hlitz Avatar asked Mar 18 '14 18:03

hlitz


1 Answers

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 
like image 159
hlitz Avatar answered Sep 25 '22 02:09

hlitz