Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@redhat.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: PATCH/RFC: Bring lin-lwp performance back to the real world
Date: Thu, 21 Nov 2002 20:51:00 -0000	[thread overview]
Message-ID: <3DDDB7B5.2070809@redhat.com> (raw)
In-Reply-To: <20021122041123.GA21389@nevyn.them.org>

>  - It's such a wonderful bandaid that a lot of the badly needed
>    cleanups may lose momentum.

``Don't you worry about that'' :-)

A back of envelope calculation shows:

> Plucking a ``random'' memory location out of thin air:
> 
> cagney@torrens$ grep 0x40040ea0 gdb.strace | grep ptrace | wc -l
>    7038

For <160 stops, GDB fetched a thread-db buffer 7000 times.  So, GDB is 
fetching an identical buffer 7000/160 ~= 50 times for every stop!

> cagney@torrens$ expr 7038 \* 250
> 1759500

250?  I happen to know that the buffer is ~1000 bytes long which gives 
us 250 (1000/sizeof(long) ptrace() calls for every buffer transfer.

The patch addresses the second problem, but not the first.  While it 
releaves a bit of steam, there is still plenty of oportunity to further 
ramp up the performance by several more orders of magnitude.

(BTW, this sort of brain-deadness on the part of GDB explains why other 
minor performance tweeks had zero benefit :-)

----

Note that the other /proc trickery is in linux-proc.c.  Should this be 
there?

Andrew



  reply	other threads:[~2002-11-22  4:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-21 20:11 Daniel Jacobowitz
2002-11-21 20:51 ` Andrew Cagney [this message]
2002-11-21 21:02   ` Andrew Cagney
2002-11-21 21:29   ` Daniel Jacobowitz
2002-11-21 21:57     ` Andrew Cagney
2002-11-22 10:58       ` Michael Snyder
2002-11-22 12:34         ` Daniel Jacobowitz
2002-11-22 13:49           ` Daniel Jacobowitz
2002-11-22 14:23             ` Andrew Cagney
2002-11-25 17:33             ` Daniel Jacobowitz
2002-11-26  7:05               ` Andrew Cagney
2002-11-22 10:57 ` Michael Snyder

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=3DDDB7B5.2070809@redhat.com \
    --to=ac131313@redhat.com \
    --cc=drow@mvista.com \
    --cc=gdb-patches@sources.redhat.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