Using Valgrind and Callgrind on Android

Lately we want to understand the cpu utilization of an Android app we wrote. We tried a few things like android-ndk-profiler and easy-performance-analyzer but they did not provide a very detailed results in terms of system calls. They are easy to use but don't tell the details we want to see. Valgrind is a very powerful profiling tool in Linux and we wondered to use that in Android. There are few topics in compiling that using Android NDK (mostly here). The answer contains detailed scripts, which is great, but there are certain confusions during the compilation. In short:

  1. There are a few bugs in the script
  2. Android-21 has a bug (issue of redefinition), but android-19 certainly works
  3. In our case, we need to analyze standalone Android binary executions

Therefore, here is my entry.

Continue reading Using Valgrind and Callgrind on Android