perf shows zero for cycle and instruction counts on TC2

Bug #1217893 reported by Tixy (Jon Medhurst) on 2013-08-28
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro Android
Won't Fix
High
Tixy (Jon Medhurst)

Bug Description

When running the 'perf' QA test on the 13.08 release [1] I noticed that running 'perf stat ls' shows zero values for cycles, instructions and branches. The same kernel on A9 vexpress gives plausible values.

[1] https://android-build.linaro.org/builds/~linaro-android/vexpress-linaro-4.2.2-13.08-release/#build=1

tags: added: perf
Naresh Kamboju (naresh-kamboju) wrote :

root@vexpress:/data/local # perf stat ls

network-test.sh
powertop
tmp

 Performance counter stats for 'ls':

          7.370816 task-clock # 0.743 CPUs utilized

                 0 context-switches # 0.000 M/sec

                 0 CPU-migrations # 0.000 M/sec

               145 page-faults # 0.020 M/sec

                 0 cycles # 0.000 GHz

     <not counted> stalled-cycles-frontend
     <not counted> stalled-cycles-backend
                 0 instructions # 0.00 insns per cycle

                 0 branches # 0.000 M/sec

                 0 branch-misses # 0.00% of all branches

       0.009922083 seconds time elapsed

root@vexpress:/data/local # uname -a
Linux localhost 3.10.16-00363-gb660011 #1 SMP Wed Oct 16 12:16:40 UTC 20
13 armv7l GNU/Linux
root@vexpress:/data/local #

Build:
https://android-build.linaro.org/builds/~linaro-android/vexpress-lsk/#build=52

Naresh Kamboju (naresh-kamboju) wrote :

this same issue is reproduced on
https://android-build.linaro.org/builds/~linaro-android/vexpress-lsk-13.10-release/#build=2

Performance counter stats for 'ls':

          8.839600 task-clock # 0.476 CPUs utilized
                 0 context-switches # 0.000 M/sec
                 0 CPU-migrations # 0.000 M/sec
               146 page-faults # 0.017 M/sec
                 0 cycles # 0.000 GHz
     <not counted> stalled-cycles-frontend
     <not counted> stalled-cycles-backend
                 0 instructions # 0.00 insns per cycle
                 0 branches # 0.000 M/sec
                 0 branch-misses # 0.00% of all branches

       0.018584417 seconds time elapsed

Changed in linaro-android:
status: New → Confirmed
Changed in linaro-android:
assignee: nobody → Tixy (Jon Medhurst) (tixy)
importance: Undecided → High
Tixy (Jon Medhurst) (tixy) wrote :

It is actually intermittent if perf shows stats for a process, it seems to depend on which cluster the measured process runs on and the order the CPU PMUs are listed in the device-tree.

Tixy (Jon Medhurst) (tixy) wrote :

It appears that big.LITTLE support in perf is absent/broken. There are people working on trying to get the framework supporting this properly.,however, I'm not aware that integrating that work with the big.LITTLE switcher (IKS) is currently on anyone's plans.

Naresh Kamboju (naresh-kamboju) wrote :

This same issue is reproduced on
https://android-build.linaro.org/builds/~linaro-android/vexpress-lsk/#build=85
https://android-build.linaro.org/builds/~linaro-android/vexpress-lsk-13.11-release/#build=1

 Performance counter stats for 'ls':

          8.575601 task-clock # 0.752 CPUs utilized
                 0 context-switches # 0.000 M/sec
                 0 CPU-migrations # 0.000 M/sec
               145 page-faults # 0.017 M/sec
                 0 cycles # 0.000 GHz
     <not counted> stalled-cycles-frontend
     <not counted> stalled-cycles-backend
                 0 instructions # 0.00 insns per cycle
                 0 branches # 0.000 M/sec
                 0 branch-misses # 0.00% of all branches

       0.011408750 seconds time elapsed

Tixy (Jon Medhurst) (tixy) wrote :

On the 13.12 linux-linaro release [1] I don't see zero for cycle counts but things are still obviousely broken judging by branch figures, e.g.

               379 branches # 0.099 M/sec
             38406 branch-misses # 10133.51% of all branches

and

                 0 branches # 0.000 M/sec
             39201 branch-misses # 0.00% of all branches

[1] https://android-build.linaro.org/builds/~linaro-android/vexpress-linaro-13.12-release/#build=1

Tixy (Jon Medhurst) (tixy) wrote :

The output of perf in the 13.04 release [1] looks sane, and I can't provoke and obviousely broken behaviour by trying profiling of differend commands or with different combination of big.LITTLE switcher on/off or by having other activity going on simultaneousely.

I'm not going to mark this bug as fixed until I have accertained what differences are actually present in this release, and/or things remain fixed in the next release.

[1] https://android-build.linaro.org/builds/~linaro-android/vexpress-linaro-14.04-release/#build=1

Naresh Kamboju (naresh-kamboju) wrote :

Perf working well on 14.04 LSK Vexpress-tc2 Android build.
I see below output which is sane.

Performance counter stats for 'top':

        129.463199 task-clock # 0.013 CPUs utilized
                 8 context-switches # 0.062 K/sec
                 0 cpu-migrations # 0.000 K/sec
               155 page-faults # 0.001 M/sec
          28550614 cycles # 0.221 GHz
   <not supported> stalled-cycles-frontend
   <not supported> stalled-cycles-backend
          15325393 instructions # 0.54 insns per cycle
           1737480 branches # 13.421 M/sec
            448280 branch-misses # 25.80% of all branches

       9.964567797 seconds time elapsed

Tixy (Jon Medhurst) (tixy) wrote :

Seems the apparent working perf in the 14.04 release was an aberation. The 14.05 release [1] gives zero count for 'branches' value about half the time...

 Performance counter stats for 'ls':

          3.921667 task-clock # 0.878 CPUs utilized
                 0 context-switches # 0.000 M/sec
                 0 CPU-migrations # 0.000 M/sec
                69 page-faults # 0.018 M/sec
           4693536 cycles # 1.197 GHz
     <not counted> stalled-cycles-frontend
     <not counted> stalled-cycles-backend
           1485207 instructions # 0.32 insns per cycle
                 0 branches # 0.000 M/sec
             32032 branch-misses # 0.00% of all branches

       0.004468583 seconds time elapsed

[1] https://android-build.linaro.org/builds/~linaro-android/vexpress-linaro-14.05-release/#build=2

Ryan Harkin (ryanharkin) wrote :
Changed in linaro-android:
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.