google / fplutil

fplutil is a set of small libraries and tools that can be useful when developing applications for Android and other platforms.
http://google.github.io/fplutil
Apache License 2.0
332 stars 49 forks source link

android_ndk_perf: Symbols not appearing in reports. #4

Open mhess-connectify opened 8 years ago

mhess-connectify commented 8 years ago

I'm trying to profile my NDK code, but symbols don't show up in the results. I've followed the steps to enable debuggable builds, and i can see function names using nm on the .a file in my libs folder. But this is what i see in the HTML report:

http://i.imgur.com/7XxJgxk.png

stewartmiles commented 8 years ago

You need to make sure your build is debuggable and contains symbols, e.g if you're building with ndk-build:

https://developer.android.com/ndk/guides/ndk-build.html#dvr

If you're using fplutil to indirectly build using ant + ndk-build:

http://google.github.io/fplutil/android_ndk_perf.html#android_ndk_perf_building

If you're debugging on an armeabi-v7a architecture device you need to make sure you've added the -mapcs-frame flag to gcc / clang's command line (again see http://google.github.io/fplutil/android_ndk_perf.html#android_ndk_perf_building )

If you've been incrementally building it may be worth cleaning and rebuilding with the debugging options enabled to verify you're building with symbols.

Cheers, Stewart

On Wed, Sep 23, 2015 at 12:00 PM, mhess-connectify <notifications@github.com

wrote:

I'm trying to profile my NDK code, but symbols don't show up in the results. I've followed the steps to enable debuggable builds, and i can see function names using nm on the .a file in my libs folder. But this is what i see in the HTML report:

http://i.imgur.com/7XxJgxk.png

— Reply to this email directly or view it on GitHub https://github.com/google/fplutil/issues/4.