Very sorry for forgetting cc to the maillist~

---------- Forwarded message ----------
From: RocChen <>
Date: Fri, Apr 26, 2013 at 10:14 PM
Subject: Re: no sample when profiling ARM Cortex-A9 with Linux kernel 3.3
To: Koteswararao Nelakurthi <>


Thanks for for quick reply.

Here is my profiling procedure (opcontrol: oprofile 0.9.7 compiled on Apr 26 2013 08:47:51):

[root]$ rm -rf /var/lib/oprofile/
(0)-(linaro)-[Fri Apr 26][22:03:05]-[.=~/Workspace/Zynq/testbench-zynq/hotcode-profiling/mediabench2_video/mpe                                                                                           g2dec/oprofile_results]
[root]$ rm -rf ~/.oprofile/
(0)-(linaro)-[Fri Apr 26][22:03:13]-[.=~/Workspace/Zynq/testbench-zynq/hotcode-profiling/mediabench2_video/mpe                                                                                           g2dec/oprofile_results]
[root]$ opcontrol --init
(0)-(linaro)-[Fri Apr 26][22:03:29]-[.=~/Workspace/Zynq/testbench-zynq/hotcode-profiling/mediabench2_video/mpe                                                                                           g2dec/oprofile_results]
[root]$ opcontrol --setup --event=CPU_CYCLES:1000 --separate=all --no-vmlinux
(0)-(linaro)-[Fri Apr 26][22:04:20]-[.=~/Workspace/Zynq/testbench-zynq/hotcode-profiling/mediabench2_video/mpe                                                                                           g2dec/oprofile_results]
[root]$ opcontrol --start --image=../mpeg2-oprofiling/src/mpeg2dec/mpeg2decode
Using 2.6+ OProfile kernel interface.
Using log file /var/lib/oprofile/samples/oprofiled.log
Daemon started.
Profiler running.
(0)-(linaro)-[Fri Apr 26][22:05:25]-[.=~/Workspace/Zynq/testbench-zynq/hotcode-profiling/mediabench2_video/mpe                                                                                           g2dec/oprofile_results]
[root]$ time ./../mpeg2-oprofiling/src/mpeg2dec/mpeg2decode -b input_base_4CIF_96bps.mpg -o3 output_base_4CIF_96bps_                                                                                           %03d
saving output_base_4CIF_96bps_000.ppm
saving output_base_4CIF_96bps_001.ppm
saving output_base_4CIF_96bps_002.ppm
saving output_base_4CIF_96bps_003.ppm
saving output_base_4CIF_96bps_004.ppm
saving output_base_4CIF_96bps_005.ppm
saving output_base_4CIF_96bps_006.ppm
saving output_base_4CIF_96bps_007.ppm
saving output_base_4CIF_96bps_008.ppm

real    0m1.593s
user    0m1.490s
sys     0m0.100s
(0)-(linaro)-[Fri Apr 26][22:05:54]-[.=~/Workspace/Zynq/testbench-zynq/hotcode-profiling/mediabench2_video/mpe                                                                                           g2dec/oprofile_results]
[root]$ opcontrol --dump
(0)-(linaro)-[Fri Apr 26][22:06:06]-[.=~/Workspace/Zynq/testbench-zynq/hotcode-profiling/mediabench2_video/mpe                                                                                           g2dec/oprofile_results]
[root]$ opreport -l ../mpeg2-oprofiling/src/mpeg2dec/mpeg2decode
WARNING! The OProfile kernel driver reports sample buffer overflows.
Such overflows can result in incorrect sample attribution, invalid sample
files and other symptoms.  See the oprofiled.log for details.
You should adjust your sampling frequency to eliminate (or at least minimize)
these overflows.
error: no sample files found: profile specification too strict ?

I review the dmesg log for something related with the pmu:

> dmesg | grep PMU
 hw perfevents: enabled with ARMv7 Cortex-A9 PMU driver, 7 counters available
> dmesg | grep pmu
 registering platform device 'arm-pmu' id 0

On Fri, Apr 26, 2013 at 9:52 PM, Koteswararao Nelakurthi <> wrote:
>>opcontrol --start --image=<application name>
Provide binary application name .
ex. opcontrol --start --image=array


On Fri, Apr 26, 2013 at 7:17 PM, Koteswararao Nelakurthi <> wrote:
Dear RocChen,

I hope i understood your situation.From the log your showed
in previous mail, your are successfully updated the oprofile
userland tool.
Coming to profiling of applications, you need do it as below

rm -rf /var/lib/oprofile/
rm -rf /root/.oprofile

opcontrol --start --image=<application name>

gcc -g <applicationname> -o <binary application name>
ex: gcc -g array.c -o array

ex. ./array

opcontrol --dump


array is sample application which is simply doing some multiplication etc.
you can use any application that will put load over CPU so that i can use
H/W counter to count the samples.

Light Load application will not generate Events and CPU can't use much
of it's time to it and hence samples might not be generated.