Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: jbbachky@aim.com
Cc: gdb@sources.redhat.com
Subject: Re: gdbserver/gdb-6/4 and lots of pthreads
Date: Wed, 15 Nov 2006 16:50:00 -0000	[thread overview]
Message-ID: <20061115164953.GA31009@nevyn.them.org> (raw)
In-Reply-To: <8C8D6E7E15FE5F6-5D0-723B@mblk-d22.sysops.aol.com>

On Wed, Nov 15, 2006 at 11:11:45AM -0500, jbbachky@aim.com wrote:
> Gdbserver attaches to my main thread and opens a socket, and then after 
> invoking gdb and specifying my remote target, I select the particular 
> thread that I wish to debug. Info threads shows all of my threads, and 
> I see that gdbserver now attaches to all of them.

Normally this is a feature :-)

> Any attempt to single-step or continue with a breakpoint results in a 
> "thrashing system". A counter in my context switching code shows almost 
> 150k switchs/second, up from about 1200/sec when not attached with gdb. 
> One of the 40 pthreads handle a 10ms SIGALRM. Almost all of the others 
> are waiting for messages.

It'll be the 10ms SIGALRM.  Fortunately, I have _just_ the thing for
you.  If you can wait another day or two, I expect to commit a patch
which dramatically improves gdbserver performance for multithreaded
applications with signals ignored by GDB.  You can find the patch on
the gdb-patches list archives if you want to try it in the mean time;
it should apply to a checkout of current CVS HEAD.  You need a patched
gdbserver and gdb client.

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2006-11-15 16:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-15 16:12 jbbachky
2006-11-15 16:50 ` Daniel Jacobowitz [this message]
2006-11-15 17:08   ` jbbachky
2006-11-16 15:15     ` Daniel Jacobowitz
2006-11-16 21:53   ` jbbachky
2006-11-16 22:04     ` Daniel Jacobowitz
2006-11-17 18:47       ` jbbachky
2006-11-17 19:08         ` Daniel Jacobowitz
2006-11-17 20:01           ` jbbachky
2006-11-17 20:14             ` Daniel Jacobowitz
2006-11-29 15:23               ` jbbachky
2006-11-29 15:26                 ` Daniel Jacobowitz

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=20061115164953.GA31009@nevyn.them.org \
    --to=drow@false.org \
    --cc=gdb@sources.redhat.com \
    --cc=jbbachky@aim.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