public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mark@klomp.org>
To: KJ Tsanaktsidis <ktsanaktsidis@zendesk.com>
Cc: elfutils-devel@sourceware.org
Subject: Re: dwarf_aggregate_size doesn't work with arrays in partial CUs
Date: Wed, 10 Nov 2021 14:40:47 +0100	[thread overview]
Message-ID: <7fa8905bc363fbb5536ce8f61278cddc23107ccb.camel@klomp.org> (raw)
In-Reply-To: <CAJ7wOOu7Pmf6FoFmAYQX=tBqxxCdnx3+pjtx2=2-VQSzp9gc-w@mail.gmail.com>

Hi KJ,

On Sun, 2021-10-03 at 16:05 +1100, KJ Tsanaktsidis via Elfutils-devel
wrote:
> I guess we don't want to hide some really expensive traversal
> operation inside a simple call to dwarf_aggregate_size, no...
> 
> What if we instead provide a way for the user to specify what
> language
> a CU is? Like "dwarf_cu_report_language(Dwarf_Die *cu, int lang)".
> That would get saved with the (partial) CU, and dwarf_srclang could
> retrieve this information (if DW_AT_language isn't set). Then, the
> user could recursively traverse all CUs and call
> dwarf_cu_report_language on each partial CU. And as a bonus, we could
> even wrap that up in dwarf_cu_traverse_partial_cu_set_language or
> something (OK, the name needs a bit of workshopping).
> 
> That way, the expensive thing is in a separate call that's marked as
> being very expensive (and cached, so it only needs to be done once).
> Sound like a reasonable approach?

Sorry for forgetting about this discussion. I do think the above makes
sense. I opened a bug to track this:
https://sourceware.org/bugzilla/show_bug.cgi?id=28578

Cheers,

Mark

      reply	other threads:[~2021-11-10 13:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-25  7:21 KJ Tsanaktsidis
2021-09-29 14:21 ` Mark Wielaard
2021-10-03  5:05   ` KJ Tsanaktsidis
2021-11-10 13:40     ` 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=7fa8905bc363fbb5536ce8f61278cddc23107ccb.camel@klomp.org \
    --to=mark@klomp.org \
    --cc=elfutils-devel@sourceware.org \
    --cc=ktsanaktsidis@zendesk.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).