From: Michael Snyder <msnyder@vmware.com>
To: hce <webmail.hce@gmail.com>
Cc: "gdb@sourceware.org" <gdb@sourceware.org>
Subject: Re: Debug threads
Date: Sat, 14 Aug 2010 00:01:00 -0000 [thread overview]
Message-ID: <4C65DCDA.1020609@vmware.com> (raw)
In-Reply-To: <AANLkTin2aM7+C3qd8LoULhoY7Pm3GsN=sWLobv368nWO@mail.gmail.com>
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
next prev parent reply other threads:[~2010-08-14 0:01 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 [this message]
2010-08-14 0:54 ` Paul Koning
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=4C65DCDA.1020609@vmware.com \
--to=msnyder@vmware.com \
--cc=gdb@sourceware.org \
--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