Hello,
I would like to use oprofile and perf tools that come with android 4.2.2.
Actually I managed to use them, but in order to do this I have to kill all CPU cores on my quad iMX6 SABRE SD board.
But in the end, I need at least one additional CPU to run my application so that the profiling results are meaningful, so how can I make it work with 2 cpus???
Here are some details:
Board: iMX6 SABRE SD quad/dual
OS: Android 4.2.2 with freescale BSP, compiled in engineering build, lunch target: sabresd_6dq
--> compiled with the instructions in Android_User_Guide.pdf from this document:
The oprofile & perf tools are present, and they run, but if I have more than 1 CPU active, they report no activity!
And if I leave only one CPU active, they work fine!
It seems like a bug somewhere in freescale code but I don't know enough to find out...
Any ideas?
解決済! 解決策の投稿を見る。
Ok, so finally I got it working, so I'll share if it can help anyone:
Basically the problem seems to be that android ships with an old oprofile version (0.9.1) that doesn't support well cortex-a9 CPU counters.
The solution is either to update to a more recent version (0.9.7), or to use timer events.
In the end I activated timer events following the instructions from this post:
http://ssvb.github.io/2011/08/23/yet-another-oprofile-tutorial.html
you just need to pass "oprofile.timer=1" to the kernel at boot and you're good to go.
About perf, it is possible to specify which events to listen to with the -e option, so I did:
"perf top -ecpu-clock" and got expected results.
Ok, so finally I got it working, so I'll share if it can help anyone:
Basically the problem seems to be that android ships with an old oprofile version (0.9.1) that doesn't support well cortex-a9 CPU counters.
The solution is either to update to a more recent version (0.9.7), or to use timer events.
In the end I activated timer events following the instructions from this post:
http://ssvb.github.io/2011/08/23/yet-another-oprofile-tutorial.html
you just need to pass "oprofile.timer=1" to the kernel at boot and you're good to go.
About perf, it is possible to specify which events to listen to with the -e option, so I did:
"perf top -ecpu-clock" and got expected results.