profiling on Android

302 views
Skip to first unread message

Sohrab

unread,
Mar 13, 2009, 1:27:50 PM3/13/09
to android-ndk
Hello everyone,

Problem:
Getting profiling inofrmation for a plugin that runs inside Adroid
Browser.

Some background Information:
1. We are a plugin that runs inside Adroid Browser.
2. To be on the safe side, I placed our .so with debuged symbol in
both out/.../symbols/data/data/com.android.browser/app_plugins/ and
out/.../symbols/ of our device folder. The entire .so was built with –
O0 and –ggdb options (and many other options).
3. There is a debug striped copy of our .so in the emulator /data/data/
com.android.browser/app_plugins folder (the location that Android
Browser looks for the plugins).
4. We are currently the only truly third party plugin in Android. We
do not relay on any spcial services, privaleges, or rely on any
backdoor API.

I ran the profilers on our plugin to gather some timing information
and had the following observations:

I am not seeing any timing information for our .so. There is plenty
of timing info for the browser and other .so.

Steps taken to profile:
> emulator -trace Ball
> Hit 'F9' // to starts the profiler recording instructions
> Hit 'F9' // after 30 sec or so - this stops the profiler recording
> quit the emulator
> tracedmdump $OUT/traces/Foo
> view $OUT/traces/Foo/dmtrace.html

Hope for Future:
Make profiling possible on the real phone in a development
environment.

David Turner

unread,
Mar 26, 2009, 2:15:37 PM3/26/09
to andro...@googlegroups.com
As far as I know, the generated traces contain enough information to produce the correct information.
I suspect some issue in the way tracedmdump searches for libraries. It would be nice if you could file
a bug on this topic, with as much detail as possible on the way you generate and place the debug
versions of the libraries.

Anders Hasselqvist

unread,
Jun 24, 2009, 11:14:39 PM6/24/09
to David Turner, andro...@googlegroups.com
Hi,

On Mar 27, 3:15 am, David Turner <di...@android.com> wrote:
> As far as I know, the generated traces contain enough information to produce
> the correct information.
> I suspect some issue in the way tracedmdump searches for libraries. It would
> be nice if you could file
> a bug on this topic, with as much detail as possible on the way you generate
> and place the debug
> versions of the libraries.

When doing a native trace files are saved in the avd directory for the
specific avd you are running now (as far as I understand).
Which tool should you use for viewing the trace?
traceview doesn't seem to work and I don't have the tracedmdump tool
(SDK 1.5).

Thanks,
Anders Hasselqvist

Reply all
Reply to author
Forward
0 new messages