+ Dave Long
hardware platform : Pandaboard ES Rev B1.
Processor: Omap4460.
software Version : linaro-12.10
kernel config: android_omap4_defconfig. I changed a few options in order to use perf.
CONFIG_HAVE_PERF_EVENTS=y
CONFIG_PERF_EVENTS=y
CONFIG_PERF_COUNTERS=y
CONFIG_HW_PERF_EVENTS=y
The command `Perf stat echo "linaro"` gives such results.
root@android:/ # perf stat echo "linaro"
linaro
Performance counter stats for 'echo linaro':
269.561767 task-clock # 0.148 CPUs utilized
10 context-switches # 0.000 M/sec
1 CPU-migrations # 0.000 M/sec
105 page-faults # 0.000 M/sec
29678044 cycles # 0.110 GHz
0 stalled-cycles-frontend # 0.00% frontend cycles idle
0 stalled-cycles-backend # 0.00% backend cycles idle
0 instructions # 0.00 insns per cycle
0 branches # 0.000 M/sec
0 branch-misses # 0.00% of all branches
1.823486284 seconds time elapsed
I use the option `-v`, and I can see that the first number of branches, instructions branch-misses and so on is zero.why?
root@android:/ # perf stat -v echo "linaro"
linaro
task-clock: 93902590 93902590 93902590
context-switches: 9 93902590 93902590
CPU-migrations: 0 93902590 93902590
page-faults: 104 93902590 93902590
cycles: 4284725 76202392 76202392
stalled-cycles-frontend: 0 76202392 76202392
stalled-cycles-backend: 0 76202392 76202392
instructions: 0 76202392 76202392
branches: 0 76202392 76202392
branch-misses: 0 76202392 76202392
Performance counter stats for 'echo linaro':
93.902590 task-clock # 0.282 CPUs utilized
9 context-switches # 0.000 M/sec
0 CPU-migrations # 0.000 M/sec
104 page-faults # 0.001 M/sec
4284725 cycles # 0.046 GHz
0 stalled-cycles-frontend # 0.00% frontend cycles idle
0 stalled-cycles-backend # 0.00% backend cycles idle
0 instructions # 0.00 insns per cycle
0 branches # 0.000 M/sec
0 branch-misses # 0.00% of all branches
0.332550049 seconds time elapsed
Can anybody give me suggestions?How can I use perf to get the value of hardware performance counter
_______________________________________________
linaro-kernel mailing list
linaro-kernel@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-kernel