public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "tromey at sourceware dot org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug symtab/17547] over-eager debuginfo reading
Date: Tue, 25 May 2021 21:24:05 +0000	[thread overview]
Message-ID: <bug-17547-4717-ziGipUkYKC@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-17547-4717@http.sourceware.org/bugzilla/>

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

--- Comment #7 from Tom Tromey <tromey at sourceware dot org> ---
Once upon a time, I added lazy reading to gdb.  The vestiges
are still in the tree, search for OBJF_PSYMTABS_READ and SYMFILE_NO_READ.
The use case was precisely what Frank is talking about - "attach"
was very slow and read a bunch of irrelevant stuff.

However, this was mostly disabled.  While it works great for some
scenarios, it also causes long pauses at "unexpected" times in other
scenarios.  For example, it makes "backtrace" randomly slow, depending
on whether the debuginfo for a frame has been read.

(The "backtrace" problem can be solved as well, by lazier reading of
the DWARF.  This is a reasonably-sized project though.)

Another problem is that setting a breakpoint becomes very expensive,
because most breakpoints require a full DWARF scan.  This too is avoidable,
at least partly, if there were a way to isolate breakpoints to a given
.so or whatever; or by the use of an index.

When disabling this feature, I think our rationale was that it's better
for users to get the delays up front, when they expect them, rather than
randomly in response to some command.


What would be truly great for something like debuginfod is to have it
index all the libraries, and then provide a fine-grained API to gdb.
Then with some work, gdb could avoid ever downloading all the DWARF
or doing a massive scan.

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

  parent reply	other threads:[~2021-05-25 21:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-04 15:59 [Bug symtab/17547] New: " tromey at sourceware dot org
2021-05-25 19:15 ` [Bug symtab/17547] " fche at redhat dot com
2021-05-25 19:18 ` cbiesinger at google dot com
2021-05-25 19:19 ` fche at redhat dot com
2021-05-25 19:44 ` simark at simark dot ca
2021-05-25 19:50 ` fche at redhat dot com
2021-05-25 20:21 ` keiths at redhat dot com
2021-05-25 21:24 ` tromey at sourceware dot org [this message]
2021-05-26  1:49 ` rfhn.fhbrrjnzeneqpf at noclue dot notk.org
2023-01-01 22:24 ` tromey at sourceware dot org
2023-01-03 23:02 ` amerey at redhat dot com
2023-01-04  2:03 ` tromey at sourceware dot org
2023-01-05  1:16 ` amerey at redhat dot com

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=bug-17547-4717-ziGipUkYKC@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@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).