Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Paul Koning <paul_koning@dell.com>
To: Michael Snyder <msnyder@vmware.com>
Cc: hce <webmail.hce@gmail.com>, "gdb@sourceware.org" <gdb@sourceware.org>
Subject: Re: Debug threads
Date: Sat, 14 Aug 2010 00:54:00 -0000	[thread overview]
Message-ID: <8B4A093D-2AE6-41EC-8781-44BAF89FE5AC@dell.com> (raw)
In-Reply-To: <4C65DCDA.1020609@vmware.com>

Another option (not using gdb) is ps -L, which lists threads.

	paul

On Aug 13, 2010, at 8:01 PM, Michael Snyder wrote:

> hce wrote:
>> Hi,
>> I am debug a problem on CentOS 5, the problem used %100 CPU and there
>> are 9 threads running. Which gdb command can I find out which thread
>> is current running and  hooked %100 CPU?
> 
> If you can attach with gdb, then there is a high probability that
> the "current" thread is the one that is eating up all the CPU.
> 
> Do "info threads", and look for the thread that has an asterisk
> ("*") in the left hand column.
> 
> If you do "continue" and then control-c and repeat the info threads
> command, it is likely that the busy thread will remain as the
> "current" thread each time (or the majority of times).
> 
> Otherwise, gdb does not have a formal way of showing you which
> thread is the most busy.
> 
> Michael


      reply	other threads:[~2010-08-14  0:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-13 23:44 hce
2010-08-14  0:01 ` Michael Snyder
2010-08-14  0:54   ` Paul Koning [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8B4A093D-2AE6-41EC-8781-44BAF89FE5AC@dell.com \
    --to=paul_koning@dell.com \
    --cc=gdb@sourceware.org \
    --cc=msnyder@vmware.com \
    --cc=webmail.hce@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox