From: Elena Zannoni <ezannoni@redhat.com>
To: David Carlton <carlton@math.stanford.edu>
Cc: Elena Zannoni <ezannoni@redhat.com>,
Daniel Jacobowitz <drow@mvista.com>,
gdb-patches@sources.redhat.com, Jim Blandy <jimb@redhat.com>
Subject: Re: [rfa] delete lookup_symbol_aux_minsyms
Date: Mon, 24 Feb 2003 18:52:00 -0000 [thread overview]
Message-ID: <15962.27382.659097.408682@localhost.redhat.com> (raw)
In-Reply-To: <ro1lm051q67.fsf@jackfruit.Stanford.EDU>
David Carlton writes:
> On Mon, 24 Feb 2003 13:21:55 -0500, Elena Zannoni <ezannoni@redhat.com> said:
>
> > Actually, I did some gcov on that function last night, running make check,
> > here is what I got.
>
> > About deleting the function. I think I would prefer if we delete the
> > 'else' part first. Then comment out the function.
>
> > But I am still not convinced that we should delete it yet.
>
> I'm not an expert on 'gcov': does the data you presented mean that, in
> some situation where lookup_symbol_aux_minsyms was called 1442 times,
> the else block was called 2 times? So you're worried about those 2
> times, that they produced correct information that wouldn't have been
> reached if we deleted the 'else' clause?
>
Yes, each number is the number of times that the line is executed. I
am not particularly worried about the 'else' clause. I agree that it's
dumb. I think it's ok to delete that.
The numbers were more like 'food for thoughts'.
elena
> If so, here's the situation with the 'else' clause. That clause calls
> lookup_symbol_aux with a mangled name as the 'name' argument. But the
> 'name' argument to lookup_symbol_aux should never be mangled: calls to
> lookup_symbol_aux always ultimately boil down to a call to
> lookup_block_symbol. And lookup_block_symbol needs a demangled name
> as its 'name' argument, not a mangled name: blocks are hashed by their
> demangled names, so passing in a mangled name is likely to result in
> searching in the wrong bucket. There might be times when
> lookup_block_symbol returns the correct value when you pass in a
> mangled name as the 'name' argument, but, if so, that's purely
> accidental; and, in those situations, the same symbol would have been
> found in the psymtab search that follows the call to
> lookup_symbol_aux_minsyms.
>
> Here's the current control flow, more or less:
>
> * Search symtabs.
>
> * Search minsyms.
>
> ** Maybe then call lookup_symbol_aux with a demangled name as the
> 'name' argument, in which case we:
>
> ** Search symtabs again, with mangled name.
>
> ** Search minsyms again, with mangled name.
>
> ** Search psymtabs, with mangled name.
>
> * Search psymtabs (with demangled name).
>
>
> The 'else' clause is the stuff that I've labeled with two asterisks.
> I don't see how the 'search symtabs again' or 'search minsyms again'
> parts could ever return anything useful. And the 'search psymtabs,
> with mangled name', might accidentally sometimes find the variable
> we're looking for; if so, however, the outer 'search psymtabs (with
> demangled name)' would have found it as well, and would do so much
> more reliably.
>
> David Carlton
> carlton@math.stanford.edu
next prev parent reply other threads:[~2003-02-24 18:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-22 19:54 David Carlton
2003-02-22 21:23 ` Daniel Jacobowitz
2003-02-24 18:04 ` David Carlton
2003-02-24 18:17 ` Elena Zannoni
2003-02-24 18:37 ` David Carlton
2003-02-24 18:52 ` Elena Zannoni [this message]
2003-02-24 23:43 ` David Carlton
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=15962.27382.659097.408682@localhost.redhat.com \
--to=ezannoni@redhat.com \
--cc=carlton@math.stanford.edu \
--cc=drow@mvista.com \
--cc=gdb-patches@sources.redhat.com \
--cc=jimb@redhat.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