Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
bokeron2020
Old
(Last edited by bokeron2020; 5th April 2011 at 06:51 PM.)
#1  
Member - OP
Thanks Meter 2
Posts: 39
Join Date: Mar 2011
Question [Q] How to trace Kernel threads ??

Hi.
I'm a total newbie with a problem.

My Defy has a bug, I believe. When the phone should be on suspend mode, a process called "suspend" starts using a lor of CPU time, so the battery lasts for just a few hours.

This is, I suppose, not the forum for asking for help about this, so I'll just say I've tried everything I could think of... and now I would like to use "strace" to... trace what's going on.

There are two problems.

One, the bug dissapears when the phone is suspended but connected to USB... so issuing commands is a problem without connection ... I suppose I could try WiFi, but I haven't tried yet.

Two. What I call the "suspend" process seems to be a kernel thread... so, I can't use strace.


Could someone, please, explain me wich command (if any) can help me trace the activity of this kernel thread ? Or... well, any other way you can think of.
 
chaihg
Old
#2  
Senior Member
Thanks Meter 50
Posts: 480
Join Date: Nov 2010
Good question and interesting one. Will wait for others to answer.
 
Beach_Head
Old
#3  
Senior Member
Thanks Meter 58
Posts: 458
Join Date: Aug 2010
You have strace compiled for Android?

Try issuing the command via ConnectBot or any other free terminal so you don't need to be connected via USB...
 
bokeron2020
Old
(Last edited by bokeron2020; 4th April 2011 at 03:15 PM.)
#4  
Member - OP
Thanks Meter 2
Posts: 39
Join Date: Mar 2011
That's part of the problem... I'm "hunting" a bug that only appears when the phone is suspended... If I use ConnectBot to write commands... the phone is, by definition, active. So...

Also... we have another problem: strace fails because "suspend" is not a process but a kernel thread... or that's what I've been told
 
bokeron2020
Old
#5  
Member - OP
Thanks Meter 2
Posts: 39
Join Date: Mar 2011
OK... I've finally been able to set up adb over wireless.

But strace doesn't work, and "top" shows that suspend almost always uses around 5%.

But... I still can't trace what suspend is doing.
 
bokeron2020
Old
#6  
Member - OP
Thanks Meter 2
Posts: 39
Join Date: Mar 2011
Would someone help me if I beg you on my knees ?
 
fritolays
Old
(Last edited by fritolays; 8th April 2011 at 01:34 AM.)
#7  
Senior Member
Thanks Meter 293
Posts: 332
Join Date: Dec 2010
Location: Great White North
Use the dalvik debugger, open command window and type ddms (assuming you have android sdk).
Once open under the Device menu you can see running process's/track them.

Heh didnt see that it doesnt happen when connected to usb. Dont know if ddms works over wifi too, should, but give it a shot.
 
Beach_Head
Old
#8  
Senior Member
Thanks Meter 58
Posts: 458
Join Date: Aug 2010
Why not just re-flash a stock SBF to get rid of the problem?
 
bokeron2020
Old
#9  
Member - OP
Thanks Meter 2
Posts: 39
Join Date: Mar 2011
Quote:
Originally Posted by Beach_Head View Post
Why not just re-flash a stock SBF to get rid of the problem?
Because, if it were that easy, the problem would have gone away sometime while flashing a sbf for the first 5 times...

Nope. It's either a bug or a hardware failure, I believe.
 
martinml
Old
#10  
Member
Thanks Meter 23
Posts: 35
Join Date: Sep 2010
Quote:
Originally Posted by fritolays View Post
Use the dalvik debugger, open command window and type ddms (assuming you have android sdk).
Once open under the Device menu you can see running process's/track them
You can't track kernel threads via ddms. Only userland processes.

 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

report this ad
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...

XDA PORTAL POSTS

Coloring Your Logcat World

Getting feedback for your app during development is as simple as adding logging info where necessary and looking … more

Guide Your Sheep to Safety with Finger Shepherd

Just a coupe of days ago, we brought you news about a game calledAgent Sheep. In that … more

Nandroid Manager Receives Major Update

Do you find yourself obsessively jumping from ROM to ROM? And do you hate having to restore a full … more

Careers in Android: Recruiter Reveals How Resumes are Chosen – XDA Developer TV

XDA Developer TV Producer Jayce released a video a … more