public inbox for archer@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Project Archer <archer@sourceware.org>
Subject: gdb index performance
Date: Wed, 23 Jun 2010 19:43:00 -0000	[thread overview]
Message-ID: <m3aaqlbkmx.fsf@fleche.redhat.com> (raw)

Jan asked for a bit more data on the performance benefit of the gdb
index work.

I ran tests on 2 machines (PPC and x86 -- I still need to try x86-64).
First, I installed a program plus all its debuginfo; I chose abiword for
the PPC box because the I have access to didn't have enough free space
for all the OO.o debuginfo, for x86 I used OO.o writer.  Then I ran a
script to generate all the .index files in /usr/lib/debug.

Then I ran 3 "attach" tests, 5 times each.  For the first set of tests I
cleared the file caches before each one; for the second set I cleared
the caches but then put gdb itself into the cache, to try to isolate its
startup time; the third set I ran with a warm cache.

I also did the same tests, but including "thread apply all bt full".
This helps negate the effect of the aranges-reading code, by forcing
some psymtabs to be read.

I did this for a recent-ish gdb master, the system gdb (in each case a
Fedora gdb, so it has the aranges code but nothing else), and then the
branch that uses the indices.

The results are appended.  All times are in seconds, elapsed time only,
average of all 5 runs.

I think the results are ok, though not quite as super as I had wanted.
The warm cache "bt" results are particularly good (actually I thought
something went wrong so I did this again by hand -- it really is that
fast) for the index approach, but I don't know how representative those
are of any real-life scenario.

We could probably make the cold-cache case a bit better by moving the
index file mapping into the background.  Also these numbers suggest that
there are some other performance problems we could attack; profiling
shows that minimal symbols and also name canonicalization (of minsyms)
are expensive.

I can email my scripts to anybody who is interested.

Tom

PPC attach results:

+----------+----------+----------+----------+
|       gdb|      cold| cache gdb|      warm|
+----------+----------+----------+----------+
|    system|     15.57|     14.02|      2.99|
+----------+----------+----------+----------+
|    master|     21.00|     19.35|     10.50|
+----------+----------+----------+----------+
|    branch|     11.02|      9.89|      1.87|
+----------+----------+----------+----------+

x86 attach results:

+----------+----------+----------+----------+
|       gdb|      cold| cache gdb|      warm|
+----------+----------+----------+----------+
|    system|     47.76|     44.31|      2.93|
+----------+----------+----------+----------+
|    master|     73.07|     66.91|     13.10|
+----------+----------+----------+----------+
|    branch|     40.20|     36.29|      2.51|
+----------+----------+----------+----------+


PPC bt results:

+----------+----------+----------+----------+
|       gdb|      cold| cache gdb|      warm|
+----------+----------+----------+----------+
|    system|     22.64|     20.92|      6.98|
+----------+----------+----------+----------+
|    master|     22.12|     20.31|     11.08|
+----------+----------+----------+----------+
|    branch|     12.50|     11.56|      2.11|
+----------+----------+----------+----------+

x86 bt results:

+----------+----------+----------+----------+
|       gdb|      cold| cache gdb|      warm|
+----------+----------+----------+----------+
|    system|    110.02|    123.06|     17.53|
+----------+----------+----------+----------+
|    master|     78.75|     71.47|     14.85|
+----------+----------+----------+----------+
|    branch|     51.84|     47.07|      3.07|
+----------+----------+----------+----------+

             reply	other threads:[~2010-06-23 19:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-23 19:43 Tom Tromey [this message]
2010-06-23 21:08 ` Jan Kratochvil
2010-06-23 21:24   ` Tom Tromey
2010-06-25 16:14     ` Tom Tromey

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=m3aaqlbkmx.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=archer@sourceware.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).