public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Nick Clifton <nickc@redhat.com>
To: Alexander Lindsay <alexlindsay239@gmail.com>
Cc: Binutils <binutils@sourceware.org>
Subject: Re: Noted slowness in profile loading with binutils 2.37
Date: Mon, 14 Feb 2022 14:18:20 +0000	[thread overview]
Message-ID: <5f5fb138-c0a7-83e6-827a-eea7f6cc5ff4@redhat.com> (raw)
In-Reply-To: <CANFcJrEPzxHscaQRefWw3aXMUs9kQx4_mq5bLyqHscHwiARvow@mail.gmail.com>

Hi Alexander,

> So it looks like you were spot-on

Yay!

The sad news is that the patch is needed for correct functionality.

>                  PR 27484
>                  * dwarf2.c (scan_unit_for_symbols): Scan twice, once to accumulate
>                  function and variable tags and a second time to resolve their
>                  attributes.

It is a "feature" of the DWARF spec that the debug info can refer
to functions and variables before their definitions are provided,
so a two pass scan is needed.

If you are feeling brave, please feel free to investigate the code
in dwarf2.c and see if there is a faster way to solve the problem.
Maybe by implementing a lazy evaluation of attributes where a function
tag is only searched for when it is referenced ?  Just an idea...

Cheers
   Nick


      reply	other threads:[~2022-02-14 14:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-08 17:44 Alexander Lindsay
2022-02-08 17:57 ` H.J. Lu
2022-02-08 18:45   ` Alexander Lindsay
2022-02-09  1:09 ` Alan Modra
2022-02-10 11:00 ` Nick Clifton
2022-02-11 18:16   ` Alexander Lindsay
2022-02-11 18:17     ` Alexander Lindsay
2022-02-14 14:18       ` Nick Clifton [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=5f5fb138-c0a7-83e6-827a-eea7f6cc5ff4@redhat.com \
    --to=nickc@redhat.com \
    --cc=alexlindsay239@gmail.com \
    --cc=binutils@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).