From: Wei-min Pan <weimin.pan@oracle.com>
To: Simon Marchi <simon.marchi@polymtl.ca>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Removing lookup_minimal_symbol_and_objfile
Date: Tue, 29 May 2018 17:25:00 -0000 [thread overview]
Message-ID: <637ac9ab-6089-b89f-ede2-6aa8d2b6ba6b@oracle.com> (raw)
In-Reply-To: <a8498e16bb9166ad20c8c80aaad2222b@polymtl.ca>
On 5/25/2018 6:24 PM, Simon Marchi wrote:
> 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
Hi Simon,
I agree with your description which looks better and will use it.
Thanks for your comment.
Weimin
prev parent reply other threads:[~2018-05-29 17:04 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
2018-05-27 20:56 ` Tom Tromey
2018-05-29 17:25 ` Wei-min Pan [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=637ac9ab-6089-b89f-ede2-6aa8d2b6ba6b@oracle.com \
--to=weimin.pan@oracle.com \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@polymtl.ca \
/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