Vio*_*ffe 20 profiling android-ndk
我只找到了一个分析工具 - http://code.google.com/p/android-ndk-profiler/.到目前为止无法使其工作,所以我想知道是否还有其他工具可用.我需要在物理设备上进行配置,因为我的应用程序甚至无法在模拟器上运行.
使Android-NDK探查器工作并不容易.您需要彻底遵循此处的步骤.
以下是一些让我获得成功的技巧:
正确使用以下功能
monstartup( "your_lib.so");
moncleanup();
如果现在生成了gmon.out,则需要将其从设备中拉出,而不是从PC中的任何位置拔出.对我来说,它只有在我去应用程序的文件夹(jni,obj,res和其他文件夹)时才有效,我这样做:
console $ adb pull sdcard/gmon.out
然后运行gprof.尝试NDK工具链中的所有版本.对我来说,只有一个人工作,这一个:
console $〜/ Libraries/android-ndk-r9/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gprof obj/local/armeabi-v7a/libxxxx.so> profile .文本