Re: Does oprofile suffer from aliasing?

William Cohen <[email protected]>
Newsgroups gmane.linux.oprofile
Message-ID <[email protected]>
On 04/30/2015 12:43 PM, Grant Edwards wrote:
> On 2015-04-30, William Cohen <[email protected]> wrote:
>>
>>> AFAICT the ARM926 core doesn't have a PMU at all -- I can find no
>>> mention of one in either ARM docs for the ARM926 or Atmel docs for the
>>> at91 parts.
> [...]
>>> Is there such a thing as software-only PMU support?
> 
>> The perf command included with newer kernels (since 2.6.31) allow
>> recording both performance monitoring hardware events and software
>> events.
> 
> So that would be a sort of software-only PMU support (from the user's
> POV)?

Hi Grant,

Yes, in theory perf should provide software-only events if no pmu is available. I have seen that happen on trimslice when the device tree didn't describe performance monitoring hardware.  However, using perf depends on having a newer kernel that works on the particular device.  In the past I have encountered arm devices that only worked with particular kernels with various patches (for example genesi efika smartbook).  I hope that you have a reasonable new kernel that works on the arm926.

> 
>> Assuming that perf is working you should be able to do following to
>> see what events it supports:
>>
>> # perf list
> [...]
>> # perf record --freq 1000 -e cpu-clock -a sleep 10
> [...]
>> # perf report
> 
> OK, thanks.  It's probably time to try to get a newer kernel running. 
> IIRC, Atmel provides kernel config examples for a few different
> versions up to 3.6 for my platform.
> 
> So, let's say I have a hardware interrupt I can hook stuff to (I do),
> and I can generate "random enough" edges on the pin in question with a
> predictable frequency distribution (that might take a bit of
> soldering, but shouldn't be too difficult).
> 
> Can I stick something in the ISR for that interrupt that will cause a
> "sample"?
> 

You could do something like that with the "perf probe" described on:

https://lwn.net/Articles/355456/
http://www.brendangregg.com/perf.html

It looks like you would need to have a script to do process to group things by the argument.

-Will


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.