public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Subject: [PATCH 00/15] Index DWARF in the background
Date: Sun, 29 Oct 2023 11:35:19 -0600	[thread overview]
Message-ID: <20231029173839.471514-1-tom@tromey.com> (raw)

This series changes gdb to do its initial DWARF indexing in the
background.

This process is mostly asynchronous with respect to the rest of gdb.
That is, rather than pre-emptively waiting for scanning to complete,
now gdb's main thread will only wait when some result of the scan is
required.

This drastically improves gdb's apparent startup time in the "normal"
case where a user does "gdb some-executable" -- e.g., for starting gdb
on itself, the time until the prompt returns goes from ~1.2 seconds to
~0.06 seconds on my machine.

This approach works by hiding most of the work from the user.  Waiting
can still be needed; for example if one starts gdb and immediately
sets a breakpoint -- however, because the indexer is reasonably fast,
and human reaction times are slow, this series still manages to be
fairly successful.

My current belief is that doing any better than this will probably
require a new debug format that isn't quite so cursed to read.

This series requires the BFD threading series I posted to the binutils
list, and the DWZ refactoring patch I sent recently.

I regression tested this on x86-64 Fedora 38.  I've also built it with
TSAN and tested that, though TSAN seems to introduce random timeouts
into the testsuite when I use "make -j8 check".

Tom



             reply	other threads:[~2023-10-29 17:38 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-29 17:35 Tom Tromey [this message]
2023-10-29 17:35 ` [PATCH 01/15] Add thread-safety to gdb's BFD wrappers Tom Tromey
2023-10-29 17:35 ` [PATCH 02/15] Refactor complaint thread-safety approach Tom Tromey
2023-10-29 17:35 ` [PATCH 03/15] Add quick_symbol_functions::compute_main_name Tom Tromey
2023-10-29 17:35 ` [PATCH 04/15] Add gdb::task_group Tom Tromey
2023-10-29 17:35 ` [PATCH 05/15] Move cooked_index_storage to cooked-index.h Tom Tromey
2023-10-29 17:35 ` [PATCH 06/15] Add "maint set dwarf synchronous" Tom Tromey
2023-10-29 17:50   ` Eli Zaretskii
     [not found]     ` <87v89tfz40.fsf@tromey.com>
2023-11-23  6:08       ` Eli Zaretskii
2023-10-29 17:35 ` [PATCH 07/15] Change how cooked index waits for threads Tom Tromey
2023-10-29 17:35 ` [PATCH 08/15] Do more DWARF reading in the background Tom Tromey
2023-10-29 17:35 ` [PATCH 09/15] Simplify the public DWARF API Tom Tromey
2023-10-29 17:35 ` [PATCH 10/15] Remove two quick_symbol_functions methods Tom Tromey
2023-10-29 17:35 ` [PATCH 11/15] Change current_language to be a macro Tom Tromey
2023-10-29 17:35 ` [PATCH 12/15] Lazy language setting Tom Tromey
2023-10-29 17:35 ` [PATCH 13/15] Optimize lookup_minimal_symbol_text Tom Tromey
2023-10-29 17:35 ` [PATCH 14/15] Avoid language-based lookups in startup path Tom Tromey
2023-10-29 17:35 ` [PATCH 15/15] Back out some parallel_for_each features 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=20231029173839.471514-1-tom@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@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).