Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Yubin via Gdb <gdb@sourceware.org>
To: Tom Tromey <tom@tromey.com>
Cc: Luis Machado <luis.machado@arm.com>, gdb@sourceware.org
Subject: Re: parallel loading of debug info in gdb
Date: Wed, 8 Jan 2025 23:40:49 +0800	[thread overview]
Message-ID: <CAJYFCiPt43LEZ-wEV8qaKXA2VjnwZjgwktB9OEKUA-yG6F39bA@mail.gmail.com> (raw)
In-Reply-To: <87frluw5me.fsf@tromey.com>

On Wed, Jan 8, 2025 at 7:45 AM Tom Tromey <tom@tromey.com> wrote:

> > Yes dependency is a problem, but some dependent libs are naturally
> > independent to be read by parallel. If there could be some way to
> > specify this, it would be great.
>
> If you try git gdb, you can enable background reading with
> "maint set dwarf synchronous off".
>


Thanks, using this command in gdb15.2 indeed make the initial loading
faster.


>
> (There's been at least one request to re-enable this by default for GDB
> 16... I wasn't sure if we should, though, considering that the data race
> fixes are pretty new.)
>
> Anyway, background reading is lazier -- the reading is started but gdb
> will only pause for it if it is truly needed.
>
> Note that the library debug info isn't really read in parallel.  Or, it
> kind of is, depending on how the scheduling shakes out.  That is, the
> DWARF reader looks at the number of worker threads and splits its work
> up accordingly.  "Overlap" can only really happen if one such worker
> finishes and then the next library's job is scheduled.
>
> This might be a bad strategy overall.  Like, testing on a big machine
> showed that the reader didn't parallelize past 8 CPUs, so maybe it would
> be better to limit the DWARF reader to 8 tasks.  Nobody has worked on
> figuring out why it doesn't scale better, though, and I wouldn't want to
> change this without knowing more.
>
> Tom
>

  reply	other threads:[~2025-01-08 15:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-07  2:14 Yubin via Gdb
2025-01-07 11:07 ` Luis Machado via Gdb
2025-01-07 11:33   ` Yubin via Gdb
2025-01-07 23:45     ` Tom Tromey
2025-01-08 15:40       ` Yubin via Gdb [this message]
2025-01-09  0:26         ` 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=CAJYFCiPt43LEZ-wEV8qaKXA2VjnwZjgwktB9OEKUA-yG6F39bA@mail.gmail.com \
    --to=gdb@sourceware.org \
    --cc=ablacktshirt@gmail.com \
    --cc=luis.machado@arm.com \
    --cc=tom@tromey.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