Hi Maynard,

Thanks for your reply.

Actually I downloaded the oprofile from git repository only.The current version I am running on my target is as below.

# opcontrol -v
opcontrol: oprofile 0.9.7git compiled on Apr 25 2011 16:54:12


Initially I  tried to run the oprofile 0.9.7 git in normal mode using hardware counter .As it is not working in that mode I am running oprofile in timer mode.

When I run the oprofile in normal mode the oprofiled daemon is not starting and it always gives error like unable to find the events and unitmask.

Also I am using opcontrol --reset every time before start of the opcntrol and still I am getting the same error for opreport.

when I open the log file using the cat command
# cat /var/lib/oprofile/samples/oprofiled.log
oprofiled: open of /var/lib/oprofile/samples//current/{kern}/no-vmlinux/{dep}/{kern}/no-vmlinux/TIM
ER.0.0.all.all.all failed: Invalid argument


The total log is filled with the above error.

I copied the binaries to /usr/bin/ of the target.Do I need to copy any libraries to the target.

Please let me any other information is required regarding this error.


Regards
Durga Prasad

On Thu, Apr 28, 2011 at 8:14 AM, Maynard Johnson <maynardj@us.ibm.com> wrote:
durga prasad wrote:
> Hi All ,
>
> I am trying to cross compile the oprofile 0.9.6 for ARMv7 for cortex A9 and
> it is success.
> I am facing issue while generating the report
>
> I am running the oprofile on the target on timer mode with the following
> command.
>
> *# insmod oprofile.ko timer=1*
>
> Insmod is success and it gives the following output
> *
> oprofile: using arm/armv7-ca9
The message above implies that your kernel supports your processor.  As I've said before, if you upgrade your oprofile, you'll have full support for cortex A9 and won't have to use timer mode.

> oprofile: using timer interrupt.*
>
> I am running the following command in the target for the oprofile.
>
> *# opcontrol --start --no-vmlinux*
> /usr/bin/opcontrol: line 2071: id: not found
So you installed oprofile in /usr on your target?  Not being embedded developer, I have to ask . . . is that typical?
> sh: 0: unknown operand
> /usr/bin/opcontrol: line 2100: id: not found
> sh: 0: unknown operand

I've never seen/heard of this error before.  Pull the latest oprofile source and build/install it.  If you still get the error, then let us know.

> Using 2.6+ OProfile kernel interface.
> Using log file /var/lib/oprofile/samples/oprofiled.log
> Daemon started.
> Profiler running.
>
> ps commad will display the daemon.
>
> I ran my simple application and after that I dumped .
>
> *#opcontrol --dump
> #opcontrol --stop*
>
> After stoppping the profiler, I am generating the opreport with following
> command its failing.
>
> *# opreport -l*
>
> I am getting the following error.
> *
> opreport error: Invalid sample file, bad magic number:
> /var/lib/oprofile/samples/current/{kern}/no-v
> mlinux/{dep}/{kern}/no-vmlinux/TIMER.0.0.all.all.all*

You probably have old sample data taken from an older, incompatible version of oprofile.  Be sure to use 'opcontrol --reset' at the beginning of your profile runs to clear out old profile data.

>
> when I used *oparchive* also I am getting the same error.
>
> *# oparchive -o /home/durga/
> oparchive error: Invalid sample file, bad magic number:
> /var/lib/oprofile/samples/current/{kern}/no-
> vmlinux/{dep}/{kern}/no-vmlinux/TIMER.0.0.all.all.all*
>
> Also I want to analyze the opreport on the host PC by transferring the files
> from the target to host. how can I do that?
> Is there any application to analyze the file generated by the oprofiler on
> the host PC ?

There are sections in the user manual (see our website) on the topics of oparchive and opimport.  Also see the mailing list archives (http://marc.info/?l=oprofile-list) and look for the topic "Running oprofile on embedded systems" from June, 2008.

-Maynard

>
> It would be great if somebody suggests me the reason behind the above error.
>
>
> Thanks in Advance,
> Durga Prasad
>
>
>
>
> ------------------------------------------------------------------------------
> WhatsUp Gold - Download Free Network Management Software
> The most intuitive, comprehensive, and cost-effective network
> management toolset available today.  Delivers lowest initial
> acquisition cost and overall TCO of any competing solution.
> http://p.sf.net/sfu/whatsupgold-sd
>
>
>
> _______________________________________________
> oprofile-list mailing list
> oprofile-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/oprofile-list




--
regards
prasad.....