Monday, June 27, 2011

NDK Profiler Improvements

I've uploaded a new version of my Android NDK profiler library. The major change in this version is much better timing accuracy through the use of ptrace. This requires Android 2.3 aka Gingerbread to work properly, so if like me you're sporting Froyo it's time to upgrade (if you can...)

If you do use Froyo or earlier then you will get timing information, but it will not be precise. In particular it will give too much time to functions called from other functions, time that is not attributed to the calling function. The actual call counts are still accurate, and it can still give you an idea of bottlenecks.

I've also added a new minimal example that is included in the source release. It's a silly example with 3 buttons and is pretty fragile, but should give you an idea of what you need to do to add profiling. There's also a new snippet of Make code that you can include to avoid copy-pasting all those TARGET_thumb_release_CFLAGS lines.

No comments:

Post a comment

Note: only a member of this blog may post a comment.