public inbox for archer@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Paul Pluzhnikov <ppluzhnikov@google.com>
Cc: Daniel Jacobowitz <drow@false.org>,
	Cary Coutant <ccoutant@google.com>,
	Dodji Seketeli <dodji@redhat.com>,
	"GDB\/Archer list" <archer@sourceware.org>
Subject: Re: [RFC] Proposal for a new DWARF name index section
Date: Sun, 06 Dec 2009 03:41:00 -0000	[thread overview]
Message-ID: <m3ljhgdb1o.fsf@fleche.redhat.com> (raw)
In-Reply-To: <m3d42ue3k6.fsf@fleche.redhat.com> (Tom Tromey's message of "Fri, 04 Dec 2009 16:12:57 -0700")

>>>>> "Tom" == Tom Tromey <tromey@redhat.com> writes:

Tom> If we can get acceptable performance without a cache, then I think that
Tom> would be preferable.  One trouble with caching is that it is still slow
Tom> the first time.

Tom> So far, it is clear that we can improve performance.  It is less clear
Tom> whether we can improve it enough, but I'm working on finding out.

It turns out that we can make it start very fast by assuming that if we
see .debug_gnu_index, then we are going to use both it and
.debug_aranges.  I changed the code to make this assumption, and to
lazily map all debug sections.  With this in the place the results are
ridiculously great, like:

    0.15user 0.02system 0:00.21elapsed

I also found out that testing this code with "gdb -batch" introduces a
bit of confusion into the results, because that will call
find_main_filename, which will require some symbol table information.
I've taken to disabling this code when looking at timings.

Also, I made another funny hack tonight.  I changed gdb to read
.debug_aranges and .debug_gnu_index in a background thread.  This was
pretty easy to do; it really just few a couple global __thread
variables.  (I didn't attempt reading full symbols in a separate thread,
because that seems a lot more involved.)

What this means is that the user will still see very fast startup times,
but also will typically have less waiting when he runs a command.  The
problem with this "fast" patch is that we are really just deferring some
work until it is needed.  But, when it is needed we still have to spend
the time to actually read the index.  Threading lets us hide a bit of
that work.

I would guess that threading will be met with revulsion :-).  But, it
seems very practical in this case.

I'll clean up this patch a bit and push it to a new branch in archer
this week.

Tom

  reply	other threads:[~2009-12-06  3:41 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-10  9:04 Dodji Seketeli
2009-08-10 14:38 ` Jan Kratochvil
2009-08-10 17:36   ` Tom Tromey
2009-08-10 18:21     ` Jan Kratochvil
2009-08-11  7:55       ` Dodji Seketeli
2009-08-11 17:45         ` Jan Kratochvil
2009-08-11 22:43           ` Tom Tromey
2009-08-12 19:20             ` Jan Kratochvil
2009-08-11 22:29       ` Tom Tromey
2009-08-20 17:31 ` Dodji Seketeli
2009-11-17 23:46   ` Cary Coutant
2009-11-20 17:25     ` Tom Tromey
2009-11-22  4:39       ` Daniel Jacobowitz
2009-11-23 19:51         ` Tom Tromey
2009-12-01 19:14       ` Tom Tromey
2009-12-02  5:17         ` Daniel Jacobowitz
2009-12-02 17:07           ` Tom Tromey
2009-12-02 17:35             ` Daniel Jacobowitz
2009-12-02 19:23               ` Tom Tromey
2009-12-02 19:39                 ` Daniel Jacobowitz
2009-12-03  1:46                   ` Paul Pluzhnikov
2009-12-04 23:13                     ` Tom Tromey
2009-12-06  3:41                       ` Tom Tromey [this message]
2009-12-07 21:32                         ` Tom Tromey
2009-12-02 16:11         ` Dodji Seketeli
2009-12-02 17:29           ` Tom Tromey
2009-12-11 23:56     ` Tom Tromey
2009-12-12  0:06       ` Daniel Jacobowitz
2009-12-12  0:13       ` Cary Coutant
2009-12-13  3:48       ` Dodji Seketeli
2009-12-14 15:32       ` Dodji Seketeli

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