[CentOS] oprofile problem in centos with custom kernel

Fri Jan 21 12:38:36 UTC 2011
Yannis Klonatos <klonatos at ics.forth.gr>

Hi!

         I am trying to profile my custom 2.6.37 linux kernel with 
oprofile in centos 5.5, and i have encountered
the following problem.

(Before everyone starts shouting, I know that custom kernels are not 
supported by centos team, however I really
need to run a modified version, due to a project concerning my MSc 
thesis. So i hope for your understanding :-) .

I have build the kernel with the following flags:

CONFIG_DEBUG_KERNEL=y
CONFIG_OPROFILE=y
# CONFIG_OPROFILE_EVENT_MULTIPLEX is not set
CONFIG_HAVE_OPROFILE=y
CONFIG_FRAME_POINTER=y
CONFIG_KPROBES=y
CONFIG_HAVE_KPROBES=y
CONFIG_KPROBE_EVENT=y
CONFIG_SAMPLE_KPROBES=m

under various suggestions i have googled in the net. I run oprofile 
using the following instructions:

#!/bin/bash
rm oprof_output.txt
/usr/bin/opcontrol --init
/usr/bin/opcontrol --setup --event=CPU_CLK_UNHALTED:100000:0:1:1 
--vmlinux /usr/src/kernels/linux-2.6.37/vmlinux
/usr/bin/opcontrol --reset
/usr/bin/opcontrol --start
/usr/bin/opcontrol --stop
/usr/bin/opcontrol --dump
/usr/bin/opreport -f -a -l   --symbols --image-path=/lib/modules/$(uname 
-r)/kernel >> oprof_output.txt

My problem is that the output reported by a simple run contains many of 
the following lines

304      304           26.0051  26.0051    /vmlinux-unknown         
/vmlinux-unknown         /vmlinux-unknown
186      490           15.9110  41.9162    /vmlinux-unknown         
/bin/bash                /vmlinux-unknown

any idea or suggestion as how to resolve the vmlinux-unknown problem? I 
would gladly provide any
other information you may need.

Thanks in advance,
Yannis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.centos.org/pipermail/centos/attachments/20110121/c5a0f151/attachment-0004.html>