Using am profile trace on system_server

202 views
Skip to first unread message

Naseer

unread,
May 13, 2010, 3:36:03 AM5/13/10
to android-platform
We have an issue on our board where system_server uses high CPU after
about 3-4 hrs of running monkey. I am trying to debug this by
profiling.

When system_server was not using much CPU I was able to run am profile
trace on it and got a meaningful result in traceview. However, when
system_server is using high CPU, the generated trace file is large
(~8MB) and traceview gives the following type of error -

ThreadData: 'android/os/MessageQueue.pullNextLocked (J)Landroid/os/
Message;' call time (59560) is less than previous time (59581) for
thread '[95] SearchDialog'


Does this mean the trace file I got is useless ? Is there any other
way to find out which thread in system_server is consuming the most
CPU from this trace file ?

--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To post to this group, send email to android-...@googlegroups.com.
To unsubscribe from this group, send email to android-platfo...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-platform?hl=en.

Atul Raut

unread,
May 14, 2010, 4:27:28 AM5/14/10
to android-...@googlegroups.com
Hi Naseer,

Something I found out see its useful for you or not.


Regards
atul 

Naseer Ahmed

unread,
May 14, 2010, 6:24:17 AM5/14/10
to android-...@googlegroups.com
Yes, I am attempting to use traceview.

David Du

unread,
May 16, 2010, 7:50:35 AM5/16/10
to android-...@googlegroups.com
You can make a test program to do this task, just like "Top".

Dianne Hackborn

unread,
May 16, 2010, 2:51:24 PM5/16/10
to android-...@googlegroups.com
If you have the device sitting there using a lot of CPU, it is a lot easier to use "top -t -m 10" to see what thread is using the time, then attach the debugger and just see what the thread is doing.  This is not a "profile to see why things are slow" situation, but "debug to see who is spinning."
--
Dianne Hackborn
Android framework engineer
hac...@android.com

Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails.  All such questions should be posted on public forums, where I and others can see and answer them.
Reply all
Reply to author
Forward
0 new messages