From: Simon Marchi <simon.marchi@polymtl.ca>
To: Weimin Pan <weimin.pan@oracle.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Removing lookup_minimal_symbol_and_objfile
Date: Sun, 27 May 2018 03:57:00 -0000 [thread overview]
Message-ID: <a8498e16bb9166ad20c8c80aaad2222b@polymtl.ca> (raw)
In-Reply-To: <1526343059-25143-1-git-send-email-weimin.pan@oracle.com>
On 2018-05-14 20:10, Weimin Pan wrote:
> Removing lookup_minimal_symbol_and_objfile and replacing it with
> lookup_bound_minimal_symbol. lookup_minimal_symbol_and_objfile
> only searches ordinary hash table for the minimal symbol entry
> while lookup_bound_minimal_symbol does both ordinary hash table
> and demangled hash table for the entry.
>
> Tested in both aarch64-linux-gnu and amd64-linux-gnu. No regressions.
Hi Weimin,
Thanks for the patch, the code looks good. But I think the commit log
is misleading. The point is that lookup_minimal_symbol_and_objfile
iterates on all objfiles and calls lookup_minimal_symbol for each of
them, effectively searching in all objfiles.
lookup_bound_minimal_symbol calls lookup_minimal_symbol with NULL, which
also effectively searches all objfiles. AFAIK, they do exactly the same
thing, so we can get rid of one (and lookup_minimal_symbol_and_objfile
happens to be the most inefficient because it ends up n^2 on the number
of objfiles).
If you are fine with this correction, please push with the commit log
adjusted.
Simon
next prev parent reply other threads:[~2018-05-26 1:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-15 14:45 Weimin Pan
2018-05-27 3:57 ` Simon Marchi [this message]
2018-05-27 20:56 ` Tom Tromey
2018-05-29 17:25 ` Wei-min Pan
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=a8498e16bb9166ad20c8c80aaad2222b@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=gdb-patches@sourceware.org \
--cc=weimin.pan@oracle.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