[prev in list] [next in list] [prev in thread] [next in thread] 

List:       oprofile-list
Subject:    Re: no sample when profiling ARM Cortex-A9 with Linux kernel 3.3
From:       Koteswararao Nelakurthi <knelakurthi () mvista ! com>
Date:       2013-04-26 14:04:20
Message-ID: CAAo=-0a0TNC1R_Hhx7Soy6mqt6=2QkcvSN6-YcV5qC6uLYbv8Q () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


>>opcontrol --start --image=<application name>
Provide binary application name .
ex. opcontrol --start --image=array

Regards
koteswararao

On Fri, Apr 26, 2013 at 7:17 PM, Koteswararao Nelakurthi <
knelakurthi@mvista.com> 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
>
> ./applicationame
> ex. ./array
>
> opcontrol --dump
>
> opreport
>
> 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.
>
>
> Regards
> koteswararao
>
>
>
> On Fri, Apr 26, 2013 at 7:08 PM, RocChen <singleroc@gmail.com> wrote:
>
>> Hai, thanks very much for your attention, sir.
>>
>> I indeed have used the oprofile 0.9.7 and even 0.9.8. Since the oprofile
>> version is update to 0.9.6 via the apt-get install, I compiled the oprofile
>> 0.9.7 and 0.9.8 from the source files. But the results were the same,
>> reported no samples.
>>
>> The opcontrol commands ware executed manually from a ssh shell.
>>
>>
>> Timer mode should work fine. If you want to use the PMU, you need to check
>> that perf is enabled in your kernel (CONFIG_HW_PERF_EVENTS=y) and that
>> your
>> interrupts are being registered correctly; either via device tree or as a
>> platform device
>>
>> I have not tested in the timer mode and I will try it right now. I check
>> the CONFIG_HW_PERF_EVENTS in the .config, it is set 'y', but I am not sure
>> the interrupts are registered correctly or not, maybe it casues the problem.
>>
>>
>>
>> 3. I download the oprofile 0.9.7 source file and compiled on the board,
>> then profile with it, the results ware the same with the oprofile 0.9.6.
>> > ./autogen.sh
>> > ./configure
>> > # to configure with kernel 3.3 header, run: ln -sf generated/autoconf.h
>> linux/autoconf.sh
>> > make
>> > make install
>> 4. so does the oprofile 0.9.8 version compiled from source.
>>
>>
>> On Fri, Apr 26, 2013 at 11:14 AM, RocChen <singleroc@gmail.com> wrote:
>>
>>> Hello, every one:
>>>   I am a newer to the oprofile and I met some problems with the oprofile.
>>>
>>> I was profiling some applications on the Zynq board (with a dual core
>>> Cortex-A9 integratd, Linux kernel 3.3, linaro 12.01 file system).
>>>
>>> 1. First, I installed the oproile with apt-get, the oprofile version was
>>> 0.9.6.
>>>     I ran the following command lists;
>>>     > opcontrol --init
>>>     > opcontrol --setup --event=CPU_CYCLES:1000 --separate=all
>>> --no-vmlinux
>>>    > opcontrol --start-daemon
>>>    > opcontrol  --start
>>>    > // here my program, namely the jpg2000dec, jpg2000enc, mpeg2dec...
>>>
>>
>> I think my applications ran long enough at the rate CPU_CYCLES:1000, so
>> it might give at leaset few hundred samples)
>>
>>   > opcontrol --stop
>>>   > opcontrol --dump
>>>   > opreport
>>>
>>> The opreport reported that no sample had been got.
>>>
>>> 2. Then I deleted all in /var/lib/oprofile and the /root/.oprofile/*,
>>> reboot the machine, rerun commands above.
>>> The opreport for all applications :
>>>
>>> CPU: ARM Cortex-A9, speed 1998 MHz (estimated)
>>> Counted CPU_CYCLES events (Number of CPU cycles) with a unit mask of
>>> 0x00 (No unit mask) count 1000
>>> samples  %        image name               symbol name
>>> 10000    100.000  no-vmlinux               /no-vmlinux
>>>
>>> but no sample for functions in the applications.
>>>
>>
>> ***************************************************
>>
>>> =====>:
>>> 3. I download the oprofile 0.9.7 source file and compiled on the board,
>>> then profile with it, the results ware the same with the oprofile0.9.6.
>>> > ./autogen.sh
>>>  > ./configure
>>> > # to configure with kernel 3.3 header, run: ln -sf
>>> generated/autoconf.h linux/autoconf.sh
>>> > make
>>> > make install
>>> 4. so does the oprofile 0.9.8 version compiled from source.
>>>
>>> BTW, if I run: dmesg | grep oprofile, it gives:
>>> oprofile: using arm/armv7-ca9
>>>
>>> ****************************************
>>
>>> So I am wondering whether I was running something wrong setups or the
>>> oprofile is now not supportting the kernel 3.3 version ?
>>>
>>> Hope I have describled the situation clearly.
>>> Any replies are appreciated~~
>>>
>>
>>
>

[Attachment #5 (text/html)]

&gt;&gt;opcontrol --start --image=&lt;application name&gt;<br>Provide binary \
application name .<br>ex. opcontrol --start \
--image=array<br><br>Regards<br>koteswararao<br><br><div class="gmail_quote">On Fri, \
Apr 26, 2013 at 7:17 PM, Koteswararao Nelakurthi <span dir="ltr">&lt;<a \
href="mailto:knelakurthi@mvista.com" \
target="_blank">knelakurthi@mvista.com</a>&gt;</span> wrote:<br> <blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">Dear RocChen,<br><br>I hope i understood your situation.From \
the log your showed<br>in previous mail, your are successfully updated the oprofile \
<br> userland tool.<br>Coming to profiling of applications, you need do it as \
below<br> <br>rm -rf /var/lib/oprofile/<br>rm -rf /root/.oprofile<br><br>opcontrol \
--start --image=&lt;application name&gt;<br><br>gcc -g &lt;applicationname&gt; -o \
&lt;binary application name&gt;<br>ex: gcc -g array.c -o array<br>

<br>./applicationame<br>ex. ./array<br><br>opcontrol \
--dump<br><br>opreport<br><br>array is sample application which is simply doing some \
multiplication etc.<br>you can use any application that will put load over CPU so \
that i can use<br>

H/W counter to count the samples.<br><br>Light Load application will not generate \
Events and CPU can&#39;t use much<br>of it&#39;s time to it and hence samples might \
not be generated.<br><br><br>Regards<span class="HOEnZb"><font color="#888888"><br> \
koteswararao</font></span><div class="HOEnZb"><div class="h5"><br> <br><br><div \
class="gmail_quote">On Fri, Apr 26, 2013 at 7:08 PM, RocChen <span dir="ltr">&lt;<a \
href="mailto:singleroc@gmail.com" target="_blank">singleroc@gmail.com</a>&gt;</span> \
wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex">

<div dir="ltr">Hai, thanks very much for your attention, sir.<div><br></div><div>I \
indeed have used the oprofile 0.9.7 and even 0.9.8. Since the oprofile version is \
update to 0.9.6 via the apt-get install, I compiled the oprofile 0.9.7 and 0.9.8 from \
the source files. But the results were the same, reported no samples. </div>



<div><br></div><div>The opcontrol commands ware executed manually from a ssh \
shell.<div><br><div><br></div><div><span \
style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:12.571428298950195px">Timer \
mode should work fine. If you want to use the PMU, you need to check</span><br \
style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:12.571428298950195px">




<span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:12.571428298950195px">that \
perf is enabled in your kernel (CONFIG_HW_PERF_EVENTS=y) and that your</span><br \
style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:12.571428298950195px">




<span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:12.571428298950195px">interrupts \
are being registered correctly; either via device tree or as a</span><br \
style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:12.571428298950195px">




<span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:12.571428298950195px">platform \
device</span><br></div><div><br></div></div><div>I have not tested in the timer mode \
and I will try it right now. I check the CONFIG_HW_PERF_EVENTS in the .config, it is \
set &#39;y&#39;, but I am not sure the interrupts are registered correctly or not, \
maybe it casues the problem.</div>



<div><br></div><div><br></div><div><br></div><div><div>3. I download the oprofile \
0.9.7 source file and compiled on the board, then profile with it, the results ware \
the same with the oprofile 0.9.6.</div>

<div>&gt; ./autogen.sh</div><div>&gt; ./configure</div><div>&gt; # to configure with \
kernel 3.3 header, run: ln -sf generated/autoconf.h linux/autoconf.sh</div><div>&gt; \
make</div><div>&gt; make install</div><div>4. so does the oprofile 0.9.8 version \
compiled from source.</div>



<div class="gmail_extra"><br></div></div><div><div><br></div><div \
class="gmail_extra"><div class="gmail_quote"><div>On Fri, Apr 26, 2013 at 11:14 AM, \
RocChen <span dir="ltr">&lt;<a href="mailto:singleroc@gmail.com" \
target="_blank">singleroc@gmail.com</a>&gt;</span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div \
dir="ltr">Hello, every one:<div>  I am a newer to the oprofile and I met some \
problems with the oprofile.</div>



<div><br></div><div>I was profiling some applications on the Zynq board (with a dual \
core Cortex-A9 integratd, Linux kernel 3.3, linaro 12.01 file system).</div> \
<div><br><div>1. First, I installed the oproile with apt-get, the oprofile version \
was 0.9.6.</div><div>    I ran the following command lists;</div><div>    &gt; \
opcontrol --init</div><div>    &gt; opcontrol --setup --event=CPU_CYCLES:1000 \
--separate=all --no-vmlinux</div>




<div>   &gt; opcontrol --start-daemon</div><div>   &gt; opcontrol  --start</div><div> \
&gt; // here my program, namely the jpg2000dec, jpg2000enc, \
mpeg2dec...</div></div></div></blockquote><div><br></div></div><div>I think my \
applications ran long enough at the rate CPU_CYCLES:1000, so it might give at leaset \
few hundred samples)</div>



<div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div \
dir="ltr"><div><div><div>  &gt; opcontrol --stop</div>




<div>  &gt; opcontrol --dump</div><div>  &gt; \
opreport</div><div><br></div></div><div>The opreport reported that no sample had been \
got. </div><div><br></div><div>2. Then I deleted all in /var/lib/oprofile and the \
/root/.oprofile/*, reboot the machine, rerun commands above.</div>




<div>The opreport for all applications :</div><div><br></div><div><div>CPU: ARM \
Cortex-A9, speed 1998 MHz (estimated)</div><div>Counted CPU_CYCLES events (Number of \
CPU cycles) with a unit mask of 0x00 (No unit mask) count 1000</div>




<div>samples  %        image name               symbol name</div><div>10000    \
100.000  no-vmlinux               /no-vmlinux</div></div><div><br></div><div>but no \
sample for functions in the applications.</div></div></div>



</blockquote><div> </div><div>*************************************************** \
</div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">




<div dir="ltr"><div><div>=====&gt;:</div><div>3. I download the oprofile 0.9.7 source \
file and compiled on the board, then profile with it, the results ware the same with \
the oprofile0.9.6.</div><div>&gt; ./autogen.sh</div>



<div>
&gt; ./configure</div><div>&gt; # to configure with kernel 3.3 header, run: ln -sf \
generated/autoconf.h linux/autoconf.sh</div><div>&gt; make</div><div>&gt; make \
install</div><div>4. so does the oprofile 0.9.8 version compiled from source.</div>




<div><br></div><div>BTW, if I run: dmesg | grep oprofile, it \
gives:</div><div>oprofile: using \
arm/armv7-ca9</div><div><br></div></div></div></blockquote><div>**************************************** \
</div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">




<div dir="ltr"><div><div></div><div>So I am wondering whether I was running something \
wrong setups or the oprofile is now not supportting the kernel 3.3 version ?</div> \
</div><div><br></div><div>Hope I have describled the situation clearly.</div><div>Any \
replies are appreciated~~</div></div> </blockquote></div><br></div></div></div></div>
</blockquote></div><br>
</div></div></blockquote></div><br>



------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr

_______________________________________________
oprofile-list mailing list
oprofile-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oprofile-list


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic