Re: Isolating high cpu load at function level

2009-06-24 Thread Mel Flynn
On Wednesday 24 June 2009 07:42:06 Gary Gatten wrote:

> I have a process with several threads - the main "worker" threads
> typically use < 20% CPU - but after upgrading to a new version they're
> now using > 90% cpu.  I'm trying to determine what function these
> threads are performing that's requiring so much more cpu.  Is it bad
> code? I bug in a library I linked against?  What?
>
>
>
> I've tried gdb with list, info threads, info stack, bt full.  I can make
> sense of some of it.  I guess what I'm hoping for is something like
> "top" at the thread level, such that functions that thread perform are
> sorted highest util (time/whatever).

You'd typically turn on profiling, but sometimes less information is good, so 
you might be able to get the info you need by having your workers report the 
information.

libwp[1] has some support for reporting that you could extend with values 
you're interested in.

[1] http://www.garypennington.net/libwp/docs/html/
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Isolating high cpu load at function level

2009-06-24 Thread Gary Gatten
Hello,

 

I have a process with several threads - the main "worker" threads
typically use < 20% CPU - but after upgrading to a new version they're
now using > 90% cpu.  I'm trying to determine what function these
threads are performing that's requiring so much more cpu.  Is it bad
code? I bug in a library I linked against?  What?

 

I've tried gdb with list, info threads, info stack, bt full.  I can make
sense of some of it.  I guess what I'm hoping for is something like
"top" at the thread level, such that functions that thread perform are
sorted highest util (time/whatever).

 

TIA for any help!

 

Gary

 









"This email is intended to be reviewed by only the intended recipient
 and may contain information that is privileged and/or confidential.
 If you are not the intended recipient, you are hereby notified that
 any review, use, dissemination, disclosure or copying of this email
 and its attachments, if any, is strictly prohibited.  If you have
 received this email in error, please immediately notify the sender by
 return email and delete this email from your system."


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"