I am doing NDK profiling for my project using android-ndk-profiler-3.1. I have made changes in Android.mk as follows...
LOCAL_PATH := $(call my-dir)
-include android-ndk-profiler.mk
include $(CLEAR_VARS)
# Module name -------------------------------------------------------
LOCAL_CFLAGS += -O3
TARGET_ARCH_ABI :=armeabi
LOCAL_CFLAGS := -pg
LOCAL_STATIC_LIBRARIES := andprof
LOCAL_LDLIBS += -llog
LOCAL_MODULE := libitv
include $(BUILD_SHARED_LIBRARY)
Application.mk is as follows...
APP_ABI := armeabi
APP_PLATFORM := android-10
I have called monstartup("itv.so"); function in the beginning of the native code and moncleanup(); function in the stop method. And gmon.out file is created successfully.And then I have pasted gmon.out in D:\android\android-ndk-r6-windows\android-ndk-r6\toolchains\arm-linux-androideabi-4.4.3\prebuilt\windows\bin directory.
But when I am trying to read gmon.out using the following command...
D:\android\android-ndk-r6-windows\android-ndk-r6\toolchains\arm-linux-androideab
i-4.4.3\prebuilt\windows\bin>arm-linux-androideabi-gprof D:\InternetTV_FD_Canvas
\libs\armeabi\libitv.so > out.txt
This Error is showing...
arm-linux-androideabi-gprof: file `D:\InternetTV_FD_Canvas\libs\armeabi\libitv.so'
has no symbols
I am not able to make out why this error is coming even I have done everything fine.
Can anybody please help me.
Any help will be appreciated.
Thanks in Advance.
The NDK build process creates 2 libraries, one with symbols and one stripped without. You install the stripped, symbol-less library in your APK, but you need to use the unstripped version with gprof. If you run:
arm-linux-androideabi-gprof D:\InternetTV_FD_Canvas\obj\local\armeabi\libitv.so
... then that should be the correct library.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With