Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@redhat.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: wim delvaux <wim.delvaux@adaptiveplanet.com>, gdb@sources.redhat.com
Subject: Re: why is gdb 5.2 so slow
Date: Fri, 01 Nov 2002 10:32:00 -0000	[thread overview]
Message-ID: <3DC2C8CF.9080908@redhat.com> (raw)
In-Reply-To: <20021101181502.GA11243@nevyn.them.org>


>> [my guess] If the condition fails, we need to thread-hop.  If the 
>> condition succeeds we need to stop all threads anyway.
> 
> 
> Oh, blast it.  So we can't use this for general conditional
> breakpoints.  If the condition is true we stop all threads before
> giving a prompt; if the condition is false we stop all threads in order
> to step over the breakpoint.

Well, the conditional expression could be pushed down into the target 
(aka kernel) as byte codes.  Part of that introspect stuff.  That way 
the kernel could co-ordinate it.

> We could do thread-specific breakpoints hit by the wrong thread this
> way... and thread-specific conditional breakpoints hit by the right
> thread but with the condition false could _probably_ be done this way
> but implementing it would be complicated.

But GDB needs to do thread specific breakpoints anyway :-)

> Now, thread-specific breakpoints hit by the wrong thread could be used
> to speed up "next"/software-single-step...
> 

>> Uli (glibc), KevinB, MichaelS, and I happened to be in the same room and 
>> talked about this.  /procfs was suggested as an alternative path.  For 
>> ptrace() Uli indicated something about running out of register arguments 
>> to use across a system call.
> 
> 
> I don't know what he's referring to... wait... request, pid, len,
> target address, buffer.  x86 can only do four.  Crappy but it could be
> worked around.
> 
> In any case, this reminded me of something I keep forgetting.  Modern
> kernels a ptrace-attached process can open the child's /proc/<pid>/mem
> and read from it.  Writing to it is disabled, and mmap is not
> implemented (oh the violence to the mm layer if that was allowed!). 
> But reading from it is probably faster than PTRACE_PEEKTEXT.  I'll
> investigate.

Ah.  How does solaris work then?

>> Apparently that guarentee is comming.  Solaris, for instance, is moving 
>> back to 1:1.  My instinct is that reduceing the system calls will make a 
>> far greater improvement than trimming back glibc.
> 
> 
> Well, I'd hate to lose NGPT support; like it or not a lot of people
> (especially in the carrier-grade

Bingo!

>   space) are starting to use it.  At the
> same time we don't need to be using the heavyweight interface when it
> isn't needed.

(By NGPT I'm guessing that you mean N:M threads) I don't think GDB will 
loose that - it will always need to support things like N:1.  It's just 
that for 1:1 threads, the implementation can be shaved down to nothing.

Andrew



  reply	other threads:[~2002-11-01 18:32 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-31 17:32 wim delvaux
2002-10-31 19:51 ` Daniel Jacobowitz
2002-11-01  5:31   ` wim delvaux
2002-11-01  6:58     ` Andrew Cagney
2002-11-01  7:15       ` wim delvaux
2002-11-01  7:17         ` Daniel Jacobowitz
2002-11-01  8:13           ` wim delvaux
2002-11-01  7:15       ` Daniel Jacobowitz
2002-11-01  8:55         ` Andrew Cagney
2002-11-01 10:14           ` Daniel Jacobowitz
2002-11-01 10:32             ` Andrew Cagney [this message]
2002-11-01 10:44               ` Kevin Buettner
     [not found]       ` <redirect-4290038@silicondust.com>
2002-11-01  8:36         ` Nick Kelsey
2002-11-01 11:43 Howell, David P
2002-11-01 12:46 ` Andrew Cagney
2002-11-04 12:44   ` Jim Blandy

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=3DC2C8CF.9080908@redhat.com \
    --to=ac131313@redhat.com \
    --cc=drow@mvista.com \
    --cc=gdb@sources.redhat.com \
    --cc=wim.delvaux@adaptiveplanet.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