Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Jun 2009 22:24:51 -0800
From:      Mel Flynn <mel.flynn+fbsd.questions@mailing.thruhere.net>
To:        freebsd-questions@freebsd.org
Cc:        Gary Gatten <Ggatten@waddell.com>
Subject:   Re: Isolating high cpu load at function level
Message-ID:  <200906242224.51785.mel.flynn%2Bfbsd.questions@mailing.thruhere.net>
In-Reply-To: <70C0964126D66F458E688618E1CD008A0793F0AC@WADPEXV0.waddell.com>
References:  <70C0964126D66F458E688618E1CD008A0793F0AC@WADPEXV0.waddell.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906242224.51785.mel.flynn%2Bfbsd.questions>