O'Reilly logo

Android NDK Beginner's Guide by Sylvain Ratabouil

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – running GProf

Let's try to profile our own application code:

  1. Open a browser window and navigate to the Android-NDK-Profiler homepage at http://code.google.com/p/android-ndk-profiler/. Go to the Downloads section and save the latest release (3.1 at the time of writing) on your computer.
  2. Unzip archive in $ANDROID_NDK/sources/android-ndk-profiler. This archive contains an Android Makefile and two libraries: one for Arm V5 and one for Arm V7.
  3. Turn Android-NDK-Profiler into a full android module (see highlighted lines). The main missing point is the export of prof.h file that we are going to include in our code.

    This Makefile uses the $TARGET_ARCH_ABI variable to select the right library version (Arm V5/V7) automatically according to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required