NDK profiling showing ".so no characters"

I am doing NDK profiling for my project using android-ndk-profiler-3.1. I made changes to 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 called monstartup ("itv.so"); function at the beginning of native code and moncleanup (); function in the stop method. And the gmon.out file was created successfully. And then I inserted gmon.out into D: \ android \ android-ndk-r6-windows \ android-ndk-r6 \ toolchains \ arm-linux-androideabi-4.4.3 \ prebuilt \ windows \ bin directory.

But when I try 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 displayed ...

 arm-linux-androideabi-gprof: file `D:\InternetTV_FD_Canvas\libs\armeabi\libitv.so' has no symbols 

I can’t understand why this error comes, even I did everything well.

Can anybody help me.

Any help would be appreciated.

Thanks at Advance.

+6
source share
1 answer

The NDK build process creates 2 libraries, one with characters and one without partitions. You install a shared library without characters 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 it should be the right library.

+6
source

Source: https://habr.com/ru/post/911929/


All Articles