Hello Mike,

 

Thank you very much for the inputs you provided.

 

However, we are again unfortunate to get oprofile working. Here is what we did –

 

We have cross-compiled oprofile.ko and the kernel and got the zImage by following the steps that you gave. The following options we enabled in .config file and built the kernel,

 

CONFIG_PROFILING=y
CONFIG_OPROFILE=m
CONFIG_HAVE_OPROFILE=y

 

When we run oprofile on the target,

# opcontrol --init
modprobe: can't load module oprofile (kernel/drivers/oprofile.ko): unknown symbol in module, or unknown parameter
modprobe: can't load module oprofile (kernel/drivers/oprofile.ko): unknown symbol in module, or unknown parameter
Kernel doesn't support oprofile

 

# lsmod
    Tainted: P
CDBlkDrv 40434 5 - Live 0x7f035000
sd8xxx 37798 1 - Live 0x7f025000
mlan 65945 1 sd8xxx, Live 0x7f00e000 (P)
mrvlsdio 4334 1 sd8xxx, Live 0x7f007000

 

This time we got one entry as “Tainted: P”. Not sure what this means though.

 

We even tried reading back the /proc/config.gz to check for the options that we had set. Unfortunately they (CONFIG_OPROFILE, CONFIG_PROFILING) are not present in this file. Alternatively, when we executed “uname –a” on the target, the timestamp was not today’s date but rather the old kernel build date.

 

Are we missing anything here?

 

Regards,

Vish.

 

 

 

From: Michael Cashwell [mailto:mboards@prograde.net]
Sent: Thursday, February 23, 2012 7:59 PM
To: Vishwanath Kulkarni (WT01 - Manufacturing & Hi Tech)
Cc: oprofile-list@lists.sourceforge.net
Subject: Re: Running OProfile on Linux target running WR 2.6.36

 

Greetings,

 

On your target, do you have "/lib/modules/2.6.36/kernel/arch/arm/oprofile/oprofile.ko"? If so but modprobe can't find it then it sounds like some mismatch with modules.dep. I'm not sure how to help there except to maybe rebuild your kernel from scratch.

 

If you don't have that .ko file then you need to build it.

 

So in addition to CONFIG_HAVE_OPROFILE=y that you already have, you also need CONFIG_OPROFILE=m

 

Then in the top-level of the kernel tree and with:

 

# KARGS="ARCH=arm CROSS_COMPILE=<your tool chain>"

# KINSTDIR="<your build-time path to your staged root target file system>"

 

do something like:

 

# make $KARGS modules || abort "In-tree module build failed."

# make $KARGS INSTALL_MOD_PATH=$KINSTDIR modules_install || abort "In-tree module install failed."

 

That should provide the needed oprofile.ko in the place where modprobe (used by opcontrol) expects it.

 

(One note: we do build our own kernel zImage and we do it before the make steps above. That may be required. I'm not sure. If module building fails you might need to build your zImage first.)

 

Good luck!

-Mike

 

On Feb 23, 2012, at 8:43 AM, <vishwanath.kulkarni@wipro.com> wrote:



Hello,

 

We are having a target device that runs WR Linux with kernel 2.6.36 on ARMv7 based processor.

 

We have cross-compiled OProfile with following options,

./configure --host=arm-linux CC=<our tool chain>gcc CXX=... ...etc...

 

When running ./configure we observed the statement something like "Checking kernel support for OProfile ... yes"

 

The product of this build are:

libbfd-2.22.so             libbfd.so          libpopt.so.0    libpopt.so.0.0.0        opannotate

oparchive                   opcontrol         opgprof          ophelp                       opjitconv

opreport                    oprofiled

 

On target board:

# cat /proc/modules

CDBlkDrv 40434 5 - Live 0x7f035000

sd8xxx 37798 1 - Live 0x7f025000

mlan 65945 1 sd8xxx, Live 0x7f00e000 (P)

mrvlsdio 4334 1 sd8xxx, Live 0x7f000000

 

When we run "opcontrol --init" on the target board, we get the following error:

# opcontrol --init

modprobe: module oprofile not found in modules.dep

modprobe: module oprofile not found in modules.dep

Kernel doesn't support oprofile

 

How do we make this "opcontrol" run successfully on the target board? The kernel is already built with CONFIG_HAVE_OPROFILE=y option. This we confirmed by seeing the option in the file /proc/config.gz on the target board. Do we still need to build oprofile.ko

 

If yes, how do we do.

If not, then how do we get away with this problem.

 

Any help in this regard is appreciated.

 

Thanks and Regards,

Vish.

 

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/_______________________________________________
oprofile-list mailing list
oprofile-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oprofile-list