public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "Steinar H. Gunderson" <sesse@google.com>
To: Nick Clifton <nickc@redhat.com>
Cc: binutils@sourceware.org, sesse@chromium.org
Subject: Re: [PATCH] Fix return code in _bfd_dwarf2_find_nearest_line().
Date: Tue, 22 Mar 2022 16:42:27 +0100	[thread overview]
Message-ID: <YjnuY6AA5nRthquN@google.com> (raw)
In-Reply-To: <ebae27de-6ebb-2782-2176-101c7858abb3@redhat.com>

On Tue, Mar 22, 2022 at 03:33:40PM +0000, Nick Clifton wrote:
> Patch approved and applied.  Thanks for fixing this!

Thanks for applying!

I have a related question about this fallback. In Chromium, scanning
through all the symbols one by one is a linked list of 975k elements
(which means chasing 975k pointers, with associated cache misses!).
With this patch, we hit that path a _lot_ less, but it's still about
half the CPU time of running perf for my use case (perhaps a bit less,
like 40%).

I looked into trying to making a faster structure, probably reusing the
trie from the other patch I posted (ie., making a separate trie that
maps address-to-symbol instead addition-to-compilation-unit), but it
seems the API is that the client has to send in the list of symbols it
wants to use for fallback? Is that right; so we cannot really create a
persistent structure? (The find_nearest_line function is marked as not
documented yet, so it's not all that easy to know what the intended API
is :-) )

/* Steinar */

  reply	other threads:[~2022-03-22 15:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-21 12:43 Steinar H. Gunderson
2022-03-22 15:33 ` Nick Clifton
2022-03-22 15:42   ` Steinar H. Gunderson [this message]
2022-03-23 11:47     ` Nick Clifton
2022-03-23 12:01       ` Steinar H. Gunderson
2022-03-23 12:10         ` Nick Clifton
2022-03-23 12:13           ` Steinar H. Gunderson

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=YjnuY6AA5nRthquN@google.com \
    --to=sesse@google.com \
    --cc=binutils@sourceware.org \
    --cc=nickc@redhat.com \
    --cc=sesse@chromium.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).