Hello again,

First let me thank you for your kind suggestions and for taking time to answer me.

On 1/21/2011 5:49 PM, Petsas Athanasios wrote:
First oprofile requires to load the module in the kernel:

sudo modprobe oprofile
Nope. I have both tried to load oprofile as a module and to link it in the kernel itself. Neither of the approached
worked for me in my Centos machine.

      Then you can follow this guide http://lovebug356.blogspot.com/2008/06/oprofile-setup-on-ubuntu.html
I have also tried this guide. Despite the fact that this is for ubuntu and NOT for Centos, this is useful only
for profiling user level tools and not kernel, since it does not mention that you must specify the path to
the kernel modules (/var/lib/`uname -r`/kernel in my system does the trick)

It works nice for me! :)

On Fri, Jan 21, 2011 at 5:14 PM, Maynard Johnson <maynardj@us.ibm.com> wrote:
Yannis Klonatos wrote:
> On 1/21/2011 4:56 PM, Maynard Johnson wrote:
>> Yannis Klonatos wrote:
>>> Hi!
>>>
>>>           I am trying to profile my custom 2.6.37 linux kernel with
>>> oprofile in centos 5.5. 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
>> Does this help?
>>      http://comp.uark.edu/~ewe/CentOS5_oprofile.html
>>
>> -Maynard
> Nope. Tried that, but it doesn't work :-( . The same problem occurs.

Another thing I found by googling . . . http://old.nabble.com/Oprofile-with-xenoprofile-patch-td18978295.html

To see if you're experiencing the same problem as described in the answer at the above line, try starting oprofile with "--verbose", which will show you the "--kernel-range" (start and end addresses) for the kernel that oprofile is obtaining from the vmlinux image you gave it.  Then after collecting a profile, generate a report with -d option to show per-instruction details, which will show you the sampled addresses.  I expect you'll see addresses attributed to "vmlinux-unknown" that are outside the kernel range you saw above from the verbose output.    Another thing to do is make sure you're running with the kernel you think you are (uname -r).  If you're still stuck, then I'm about tapped for ideas.  Hopefully someone else in the community with CentOS experience can help.
Nope. I have also tried this but didn't work. I have gotten the ranges of the kernel and the reported symbols seem to be off, as you mentioned. I believe I have gotten the kernel
and everything ok, and I now assume (after what seems to be a billion tries) that it has something to do with the way that Centos packs things up the uncompressed image?
I honestly can't assume anything else, since a similar procedure seems to work on my home Debian :-( . I honestly hope someone can help me in this list, since I am out of
ideas.

Best regards,
Yannis

-Maynard

>>> would gladly provide any
>>> other information you may need.
>>>
>>> Thanks in advance,
>>> Yannis
>>>
>>> ------------------------------------------------------------------------------
>>> Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
>>> Finally, a world-class log management solution at an even better price-free!
>>> Download using promo code Free_Logger_4_Dev2Dev. Offer expires
>>> February 28th, so secure your free ArcSight Logger TODAY!
>>> http://p.sf.net/sfu/arcsight-sfd2d
>>> _______________________________________________
>>> oprofile-list mailing list
>>> oprofile-list@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/oprofile-list
>


------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
oprofile-list mailing list
oprofile-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oprofile-list