public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug symtab/29105] New: new DWARF reader still slow
@ 2022-04-29 19:51 tromey at sourceware dot org
  2022-04-29 20:09 ` [Bug symtab/29105] " tromey at sourceware dot org
                   ` (31 more replies)
  0 siblings, 32 replies; 33+ messages in thread
From: tromey at sourceware dot org @ 2022-04-29 19:51 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=29105

            Bug ID: 29105
           Summary: new DWARF reader still slow
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: symtab
          Assignee: unassigned at sourceware dot org
          Reporter: tromey at sourceware dot org
  Target Milestone: ---

Pedro pointed out that using the index cache is still faster than
the new DWARF reader.  I think I found why:

What happens here is that gdb does the finalization step in the
background.  Interactively, this helps make it seem faster.  However,
it's not really faster, it is just deferring some work.

You can see it with an invocation like:

   gdb -q -batch -iex 'set debug timestamp 1' -iex 'set debug dwarf-read 1' -ex
start ./gdb

Here for gdb-with-an-index I see:

    0.820423 [dwarf-read] dwarf2_initialize_objfile: found gdb index from file
    1.699175 [dwarf-read] process_queue: Expanding one or more symtabs of
objfile /tmp/gdb.idx ...

But for ordinary gdb:

    1.310033 [dwarf-read] dwarf2_build_psymtabs_hard: Done building psymtabs of
/tmp/gdb
    4.666649 [dwarf-read] process_queue: Expanding one or more symtabs of
objfile /tmp/gdb ...

This is disappointing of course.  It might be possible to reduce this
time at the cost of a bit more complexity in the lookup code and perhaps
a bit more memory use.  For example, right now finalization merges the
results from all the readers into a single entry table -- but maybe the
table could remain sharded instead.  Another possibility might be to do
the work in worker threads and, instead of sharding the result, pre-sort
the vectors and use a sorted merge operation to combine them.


See the last messages in this thread:

https://sourceware.org/pipermail/gdb-patches/2022-April/188194.html

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2022-12-14 10:23 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-29 19:51 [Bug symtab/29105] New: new DWARF reader still slow tromey at sourceware dot org
2022-04-29 20:09 ` [Bug symtab/29105] " tromey at sourceware dot org
2022-05-13 20:56 ` tromey at sourceware dot org
2022-05-13 21:01 ` tromey at sourceware dot org
2022-05-16 18:51 ` tromey at sourceware dot org
2022-05-18 16:12 ` simon.marchi at polymtl dot ca
2022-05-20  1:54 ` simark at simark dot ca
2022-05-20 15:13 ` tromey at sourceware dot org
2022-05-20 15:36 ` simon.marchi at polymtl dot ca
2022-05-20 15:48 ` simon.marchi at polymtl dot ca
2022-05-26 13:49 ` cvs-commit at gcc dot gnu.org
2022-05-26 13:50 ` tromey at sourceware dot org
2022-07-13 16:49 ` tromey at sourceware dot org
2022-09-23 20:23 ` tromey at sourceware dot org
2022-09-23 20:44 ` tromey at sourceware dot org
2022-10-02  0:19 ` brobecker at gnat dot com
2022-10-06 20:44 ` tromey at sourceware dot org
2022-10-24 19:27 ` simon.marchi at polymtl dot ca
2022-11-01 20:42 ` tromey at sourceware dot org
2022-11-04 20:05 ` tromey at sourceware dot org
2022-11-04 20:10 ` simon.marchi at polymtl dot ca
2022-11-04 21:27 ` tromey at sourceware dot org
2022-11-04 21:28 ` tromey at sourceware dot org
2022-11-04 21:28 ` tromey at sourceware dot org
2022-11-05  1:28 ` simark at simark dot ca
2022-11-07 16:28 ` tromey at sourceware dot org
2022-11-16  0:09 ` tkacvins at gmail dot com
2022-11-16  0:56 ` simark at simark dot ca
2022-11-16 15:07 ` tkacvins at gmail dot com
2022-12-01 16:44 ` cvs-commit at gcc dot gnu.org
2022-12-01 18:18 ` cvs-commit at gcc dot gnu.org
2022-12-01 18:22 ` tromey at sourceware dot org
2022-12-14 10:23 ` cvs-commit at gcc dot gnu.org

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).