简体   繁体   English

android上的perf工具不会产生结果

[英]perf tool on android does not impart result

I set the below kernek configs and built the kernel. 我设置以下kernek配置并构建了内核。 And separately built perf in kernel/tools/perf using http://kwangwoo.blogspot.in/2011/11/performance-monitoring-on-arm.html 并使用http://kwangwoo.blogspot.in/2011/11/performance-monitoring-on-arm.html在kernel / tools / perf中单独构建了perf

CONFIG_HAVE_PERF_EVENTS=y   
CONFIG_PERF_USE_VMALLOC=y   
CONFIG_PERF_EVENTS=y   
CONFIG_PERF_COUNTERS=y   
CONFIG_HW_PERF_EVENTS=y   

But I get 0 for most of the stuff. 但是我得到的大多数东西都是0。

  Performance counter stats for 'ls':

     21.059054 task-clock                #    0.313 CPUs utilized          
            80 context-switches          #    0.004 M/sec                  
             0 CPU-migrations            #    0.000 K/sec                  
           139 page-faults               #    0.007 M/sec                  
             0 cycles                    #    0.000 GHz                     [80.24%]
             0 stalled-cycles-frontend   #    0.00% frontend cycles idle    [64.89%]
             0 stalled-cycles-backend    #    0.00% backend  cycles idle    [75.43%]
             0 instructions              #    0.00  insns per cycle        
             0 branches                  #    0.000 K/sec                  
             0 branch-misses             #    0.00% of all branches         [65.55%]

   0.067236380 seconds time elapsed

But I get 0 for most of the counters. 但是我得到的大多数计数器都是0。

I did this on nexus 4 device. 我在nexus 4设备上做到了这一点。 What could be the problem? 可能是什么问题呢? Can someone please help? 有人可以帮忙吗?

I compiled a Kitkat host with kernel 3.4.0 for Nexus 4 and I get the same results. 我为Nexus 4编译了带有3.4.0内核的Kitkat主机,并且得到了相同的结果。

I found that in the kernel, there is this file, specific for Krait: arch/arm/kernel/perf_event_msm_krait.c It is well used because in dmesg, I get: 我发现在内核中有一个特定于Krait的文件:arch / arm / kernel / perf_event_msm_krait.c很好用,因为在dmesg中,我得到:

<6>[ 0.002350] hw perfevents: enabled with ARMv7 Krait PMU driver, 5 counters available <6> [0.002350]硬件性能:通过ARMv7 Krait PMU驱动程序启用,有5个计数器

But I think that Krait PMU has a very limited support in this kernel version. 但是我认为Krait PMU在此内核版本中的支持非常有限。 That would be confirmed by this lwn article titled "Support Krait CPU PMUs" . 这篇题为“ Support Krait CPU PMUs”的lwn文章将对此予以确认。 The date of this patch is January this year and I don't see it in kernel 3.13. 该补丁的发布日期是今年1月,我在内核3.13中看不到它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM