Thanks. I use this command git checkout --track remotes/origin/tilt-3.4
Perf does give me the value of performance counter.But when execute the command perf stat -v echo "linaro" , context-switches is 0. Following is the full result. root@(none):/# ./perf stat -v echo "linaro" linaro task-clock: 1464844 1464844 1464844 context-switches: 0 1464844 1464844 CPU-migrations: 0 1464844 1464844 page-faults: 121 1464844 1464844 cycles: 1738255 1464844 1464844 stalled-cycles-frontend: 349665 1464844 1464844 stalled-cycles-backend: 1308413 1464844 1464844 instructions: 637447 1464844 1464844 branches: 62121 1464844 1464844 branch-misses: 31739 1464844 1464844
Performance counter stats for 'echo linaro':
1.464844 task-clock # 0.787 CPUs utilized * 0 context-switches # 0.000 M/sec 0 CPU-migrations # 0.000 M/sec * 121 page-faults # 0.083 M/sec 1738255 cycles # 1.187 GHz 349665 stalled-cycles-frontend # 20.12% frontend cycles idle 1308413 stalled-cycles-backend # 75.27% backend cycles idle 637447 instructions # 0.37 insns per cycle # 2.05 stalled cycles per insn 62121 branches # 42.408 M/sec 31739 branch-misses # 51.09% of all branches
0.001861593 seconds time elapsed
Is there any kernel version supports both complete performance counters and android?Because I want to use perf when running android program.Thanks.
2012/12/5 David Long dave.long@linaro.org
On 12/05/12 00:32, Peng Fan wrote:
Thanks for your reply ,David Long. Can you give me url of the kernel version 3.4.19?Thanks.
I suggest checking out the "tilt-3.4" branch of git://
git.linaro.org/landing-**teams/working/ti/kernel.githttp://git.linaro.org/landing-teams/working/ti/kernel.git
That is based on 3.4.20.
git clone git://git.linaro.org/landing-**teams/working/ti/kernel.githttp://git.linaro.org/landing-teams/working/ti/kernel.git cd kernel git checkout --track tilt-3.4
Looks like omap4plus_defconfig already has what you need for hardware perf counters.
-- David Long Kernel Engineer, TI Landing Team Linaro