Hi,

On Mon, Mar 21, 2016 at 7:31 PM, Rajiv Nishtala <nishtala....@gmail.com>
wrote:

>
> Hi all,
>
> There is a bug in libpfm4.7.0 and perf on ARM Juno 64bit
> Here are some details.
> uname -a
> Linux juno-1 4.3.0-rc2 #1 SMP Wed Sep 23 15:51:12 CEST 2015 aarch64
> aarch64 aarch64 GNU/Linux
>
> cat /proc/cpuinfo
> processor    : 0
> Features    : fp asimd evtstrm aes pmull sha1 sha2 crc32
> CPU implementer    : 0x41
> CPU architecture: 8
> CPU variant    : 0x1
> CPU part    : 0xd07
> CPU revision    : 1
>
> processor    : 2
> Features    : fp asimd evtstrm aes pmull sha1 sha2 crc32
> CPU implementer    : 0x41
> CPU architecture: 8
> CPU variant    : 0x0
> CPU part    : 0xd03
> CPU revision    : 3
>
> Processor 0 and 1 are Cortex A57; Processor 2, 3, 4 and 5 are Cortex A53.
>
> Problem: Perfmon and perf report null values if application is moved
> between cores while executing.
>
> Steps to reproduce the problem:
> exp1: Execute "./syst" (which provides systemwide profiling) available
> under *perf_examples, *and observe that the first reading is a garbage
> value and the subsequent readings are 0.
> (let's assume the system isn't doing any work. in theory, it is not
> possible because the kernel is doing something! and perfmon should report
> something)
>
> exp2: Run a stress microbenchmark doing only computations pinned to core 0
> (taskset -pc 0 <stress_pid>) , "./syst" does have a variability on core 0
> only. This is expected based on the result observed from the first
> experiment (refer exp1).
>
> exp3: Move the stress_pid to say... core 2 (taskset -pc 2 <stress_pid>)
> while the session of "./syst" is still active,  the readings on core 0 AND
> 2 are 0. Which is not expected behavior as I would expect core 2 to report
> performance statistics for that core.  On the other hand, if I restart
> "./syst", it does report correct readings on core 2 as expected.
>
> I investigated a little further and checked that it is not an issue that
> core 2 is A53, and core 0 is A57; because even if I moved stress_pid in
> exp2 to core 1, it still fails.
>
> I also tried pinning "./syst" to a given core type and ran stress_pid,
> only a given core in that coretype. It still reports a null value if I move
> the pid to a different core in the same coretype.
>
> Btw, this happens also if I specify the pid of the application, that is
> PerThreadMonitoring using "./task_cpu".
>
> The exact same issues were found with "perf".
> is it a known bug?
> Any help will be appreciated.
>
> I believe you are running into the power saving issues that perf and
perf_events are running into on ARM platforms and not just on your
processor.
To increase power saving, certain ARM platforms use CPU offlining. That
means that when a CPU goes idle, it is put offline and all tasks running on
it are migrated to another CPU. The effect of offlining on a perf_events
event is that the event is stopped and the counter is put into error mode
(or
it should be). The consequence at the user level is that you will read 0 or
garbage.

You can verify that this is indeed what you experiencing by either ensuring
that all monitored CPUs remain busy throughout your run or that the power
saving
mode is disabled. On NVIDIA Cortex A15 processor this is called the CPU
quiet technology.

Hope this helps.


> Best Regards,
> Rajiv Nishtala
>
>
>
> ------------------------------------------------------------------------------
> Transform Data into Opportunity.
> Accelerate data analysis in your applications with
> Intel Data Analytics Acceleration Library.
> Click to learn more.
> http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
> _______________________________________________
> perfmon2-devel mailing list
> perfmon2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/perfmon2-devel
>
>
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
_______________________________________________
perfmon2-devel mailing list
perfmon2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

Reply via email to