Re: Does oprofile suffer from aliasing?
William Cohen <[email protected]>
| Newsgroups | gmane.linux.oprofile |
|---|---|
| Message-ID | <[email protected]> |
On 04/29/2015 12:27 PM, Grant Edwards wrote: > I'm looking for a way to determine what processes/threads are using up > the most CPU time on an ARM926 system. We're running out of cycles > and want to know where to concentrate optimization efforts. The > platform is currently running 2.6.22, but I could switch to a later > kernel if it would buy me some useful profiling data. > > The values printed by 'top' are meaningless due to aliasing. > > Most of the relevent threads are triggered by timers on fixed cycles > and run for much less than one kernel tick. If I run a simple test > with a thread that does a some work every 10ms, and top is using 10ms > samples, then depending on the phase between the two 100Hz cycles, top > may think the thread is using 0% or 100% (or sometimes fairly random > values in between). > > The documentation I've read on oprofile also refers to sampling, > though I can't find a description of how that sampling is done. If > the sampling is random enough compared to the kernel timers, then it > might work. > > Is oprofile going to produce useful data for the case where threads > are triggered on fixed cycles by timers? > > If not, can anybody suggest anything else? > Hi Grant, 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? 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. The other major question is whether the kernel is built with the proper oprofile driver. Older kernel for ARM expect things to be statically selected for the appropriate target architecture (http://lxr.linux.no/#linux+v2.6.22/arch/arm/oprofile/Kconfig). According to http://processors.wiki.ti.com/index.php/Feature_Comparison:_ARM_926,_1136_and_Cortex-A8 the arm926 is armv5 based. It looks like the xscale architecture is also v5, but the processor identification is going to be different and I am not sure if the performance monitoring hw is intel specific. Looks like someone else has similar issue in the past: http://permalink.gmane.org/gmane.linux.oprofile/4388 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. Unfortunately, it looks like timer support is going to be the only thing available unless you modify xscale support to provide arm926 (armv5) support. -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