public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mark@klomp.org>
To: "Frank Ch. Eigler" <fche@redhat.com>, Milian Wolff <mail@milianw.de>
Cc: elfutils-devel@sourceware.org
Subject: Re: parallel downloads of multiple debuginfo files
Date: Fri, 15 Apr 2022 15:11:55 +0200	[thread overview]
Message-ID: <3ca917c7b98423ad5bc711900a7d46753fffc48a.camel@klomp.org> (raw)
In-Reply-To: <20220408213120.GE23295@redhat.com>

Hi,

On Fri, 2022-04-08 at 17:31 -0400, Frank Ch. Eigler via Elfutils-devel
wrote:
> Hi -
> 
> > But once again - isn't this a problem that everyone using dwfl is
> > going to 
> > encounter? Should we not try to find a general solution to this
> > problem and 
> > fix it for all consumers of the API?
> 
> I suspect not many apps are going to have a complete list of files
> they know they'll need a priori.  A live profiler tends to find out
> about target files gradually.  A debugger uses debuginfo to help
> enumerate other debuginfo.  DWZ files can only be even known of when
> the base DWARF file is fetched.

A "two stage" profiler like perf, which first just records build-ids,
addresses and stack dumps, then afterwards does address/symbol/dwarf
resolution and backtracing, can know before the second stage all the
needed debuginfo for all the build-ids recorded. And a debugger can be
"greedy" and try to make sure all debuginfo for a core file or live
process is available up front. I believe gdb for example does try to
generate symbol tables for everything on startup in a background thread
so everything is available quickly once the user is really starting to
debug.

>   So yeah I'm not sure there exists a
> widespread general problem for which multithreading is not a workable
> solution.

That said, I am not sure multithreading is a real solution for the
above scenarios. Doing parallel downloads is often not that efficient.
It is better to reuse the same debuginfo_client handle to download
things serially, that way you can reuse the existing connection instead
of having to set it up for each download separately.

Cheers,

Mark

      reply	other threads:[~2022-04-15 13:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-08 20:53 Milian Wolff
2022-04-08 20:54 ` Frank Ch. Eigler
2022-04-08 20:58   ` Milian Wolff
2022-04-08 21:31     ` Frank Ch. Eigler
2022-04-15 13:11       ` Mark Wielaard [this message]

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=3ca917c7b98423ad5bc711900a7d46753fffc48a.camel@klomp.org \
    --to=mark@klomp.org \
    --cc=elfutils-devel@sourceware.org \
    --cc=fche@redhat.com \
    --cc=mail@milianw.de \
    /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).