Re: Does oprofile suffer from aliasing?
William Cohen <[email protected]>
| Newsgroups | gmane.linux.oprofile |
|---|---|
| Message-ID | <[email protected]> |
On 04/29/2015 04:34 PM, Grant Edwards wrote: > On 2015-04-29, William Cohen <[email protected]> wrote: > >> So the issue is the over/under sampling because the top is sampling >> on intervals that pretty much match up with the timers used by the >> threads? > > Or multiples thereof. Or timers that share harmonics with the > sampling frequency. Or any consistent correlation with when different > things run. > > [To correct my earlier mis-statement, it's not top that's doing the > sampling, it's really the kernel itself which does the sampling every > timer tick. Top just periodically harvests the sampled info from > /proc/<whatever> and compiles it.] > > In order for sampling to be meaningful it has to be faster by an order > of magnitude or three than the things you're measuring (which are > probably running for anywhere from a hundred microseconds up to maybe > a millisecond or two) or (for things like CPU usage for long-lived > programs) the sampling has to be uncorrelated with the occurances of > what you're measuring. For what I'm doing a random sampling trigger > with a uniform distribution of maybe 10-100ms would be fine. > >> The linux 2.6.22 kernel does not provide the kernel perf support, so >> you will not be able to use operf, only the opcontrol will be usable >> with this kernel. > > I can update to a newer kernel if needed, but I don't think it will > help. > >> Looking at new kernel linux 3.19 perf >> (http://lxr.linux.no/#linux+v3.19.1/arch/arm/kernel/perf_event_cpu.c) >> it doesn't seem to be armv5 support in there either. > > Agreed. > >> Unfortunately, it looks like timer support is going to be the only >> thing available unless you modify xscale support to provide arm926 >> (armv5) support. > > Except that xscale and arm926 are completely different hardware > implementations. The only thing they share is an instruciton set. > Early versions of the xscale had a core by Intel that implemented the > ARMv5 instuction set. The ARM926 has a core by ARM that also > implements the ARMv5 instruction set. But they are otherwise > unrelated and not based on a single common gate (and certainly don't > have any peripherals like PMUs in common). > > 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. > > So, I'm not sure how one would go about porting code from xscale or > any other architecture to the ARM926. > > Is there such a thing as software-only PMU support? > Hi Grant, The perf command included with newer kernels (since 2.6.31) allow recording both performance monitoring hardware events and software events. Assuming that perf is working you should be able to do following to see what events it supports: perf list Assuming the above works, you might be able to use the following to change record samples at something other than the default timer frequency to get data for 10 seconds on the machine: # perf record --freq 1000 -e cpu-clock -a sleep 10 then the following to see where the samples are: perf report -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