My phone keeps slowing down and burning battery. How can I debug performance and cpu consumption? (DHD 2.2) I know there are already a lot of threads about suggestions on how to improve performance  and, strongly related, save battery life on your android. I also have tried most of the tools to diagnose problems (eg. WatchDog).

Problem is, my brand new HTC Desire HD will often be snappy and responsive, sometime get a few slow downs, and not-so-rarely start being completely unresponsive, as bad as my previous iPhone 3G which I gave away for exactly that reason.
Also, battery would last less than 24hours even with extremely little use of the display (a huge battery drainer indeed), with background-data and auto-sync on, without GPS and with half of the time WiFi connection and for the rest WiFi off.

WatchDog is usually not seeing anything weird. No process seems taking a huge hit on the CPU even when the phone is acting slowly; just today I got a first warning - HTC Sense Background 99.9%.

So I would like to go a bit deeper in my debug. I /could/ uninstall all applications I installed, but I'd rather understand what is really causing the problem.

So this is the real question: how can I better debug what's going on inside my Android?

Does anybody have some tutorial/tools/suggestions?

I guess going with adb from my PC might provide more information, any hint/feedback?

Some additional information after feedback from DarthNoodles...
NB. I'm not putting it here to 'debug' my own phone on this forum, just to provide comparison information!

standard Battery Consumption info

If i've been using the phone, i get 'Display' to take most of the battery usage - ~60% on average (is that too much?).

If not, it's 'Android OS' which takes on average about 60%, and 'Android System' usually about 10-15%

There usually is no installed application appearing there

hidden debug

hey that's great! I might not have yet learned about everything but i'll try to write down what I see...

Since it has a graphical, not numerical display I'll rate '100' the first, longest bar and make an estimation of the other ones.

CPU usage

(for all time of timing a get a similar distribution)


'init'  has a HUGE blue+red bar; Android System comes 2nd with a tiny 1px blue bar


Partial wake usage

Total Time


'HTC Sense' 100 blue bar
'Android System' 30 blue bar
less for the rest


Since last unplugged


'Android System' 100 blue bar
'HTC Sense' 30 blue bar
'Mail' 5 blue bar
...
'UID 10013' 'partial Wakelock' ~2 blue bar!


Other Usage

Total all time


Running      35.8%
Screen on    11.1%
Phone on      0.8%
Wifi On      41.6%
Wifi Running 41.6%
BlueTooth On  6.6%


Since last unplugged


Running      37.5%
Screen on     3.8%
Phone on      1.8%
Wifi On      45.8%
Wifi Running 45.8%


I am under the impression that it's HTC Sense or some other android process that is taking my resources... but I don't really understand why yet...

WatchDog

Getting some warnings for 'com.htc.bgp' taking too much cpu (~55%)

Thanks!
The adb likely won't be of much help.  The apps need to have debugging enabled to be able to see their thread and relative performance I believe.  

I assume you've looked at the battery usage menu in your phone.  What is it telling you?

You could the hidden debug menu in your HD.  It may provide more info.  Open your phone dialer and dial *#*#4636#*#*.  Give that a try.