[英]Linux perf stat tool returns zero instructions count. What am I missing here?
I am trying to get some basic performance data on my new Galaxy S4 phone. 我正在尝试在新的Galaxy S4手机上获取一些基本性能数据。 I've already compiled a custom kernel and managed to flash it onto the device using Odin.
我已经编译了一个自定义内核,并设法使用Odin将其闪存到设备上。 These are the kernel modules related to perf tool that I have enabled:
这些是我启用的与perf工具相关的内核模块:
CONFIG_HAVE_PERF_EVENTS=y
CONFIG_PERF_USE_VMALLOC=y
CONFIG_PERF_EVENTS=y
CONFIG_PERF_COUNTERS=y
I've also cross-compiled the perf tool. 我还交叉编译了perf工具。 The problem is that when I run the following command:
问题是当我运行以下命令时:
perf stat ls
The output does not seem to be quite right: 输出似乎不太正确:
Performance counter stats for 'ls':
10887392 cycles # 0.000 Ghz
0 instructions # 0.00 insns per cycle
0.012448321 seconds time elapsed
I've set the cpu policies to 'userspace' and did: 我已将CPU策略设置为“用户空间”,并执行了以下操作:
cpufreq-set -f 1600000
in order to make sure that all the cores are always working at max frequency. 为了确保所有内核始终以最大频率工作。
I would appreciate any help. 我将不胜感激任何帮助。
Here are links to similar cases without a solution: http://lists.linaro.org/pipermail/linaro-kernel/2012-December/002611.html http://forums.arm.com/index.php?/topic/15020-pmu-in-cortex-a8-omap-3530-what-am-i-doing-wrong/ 以下是没有解决方案的类似案例的链接: http : //lists.linaro.org/pipermail/linaro-kernel/2012-December/002611.html http://forums.arm.com/index.php?/topic/ 15020 pmu-in-cortex-a8-omap-3530-我做错了什么/
Relevant stackoverflow topic: How to measure program execution time in ARM Cortex-A8 processor? 相关的stackoverflow主题: 如何测量ARM Cortex-A8处理器中的程序执行时间?
Can you see other HW events like "CPU cycles" or "cache misses"? 您可以看到其他硬件事件,例如“ CPU周期”或“高速缓存未命中”吗?
perf stat -e cache-misses,cycles ls
You might want to set CONFIG_HW_PERF_EVENTS as well. 您可能还需要设置CONFIG_HW_PERF_EVENTS。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.