0

I set the below kernek configs and built the kernel. And separately built perf in kernel/tools/perf using http://kwangwoo.blogspot.in/2011/11/performance-monitoring-on-arm.html

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.

  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.

I did this on nexus 4 device. What could be the problem? Can someone please help?

1 Answers1

0

I compiled a Kitkat host with kernel 3.4.0 for Nexus 4 and I get the same results.

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:

<6>[ 0.002350] hw perfevents: enabled with ARMv7 Krait PMU driver, 5 counters available

But I think that Krait PMU has a very limited support in this kernel version. That would be confirmed by this lwn article titled "Support Krait CPU PMUs". The date of this patch is January this year and I don't see it in kernel 3.13.

amigadev
  • 396
  • 1
  • 5