public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: David Carlton <carlton@math.stanford.edu>
To: Andrew Cagney <ac131313@redhat.com>
Cc: Elena Zannoni <ezannoni@redhat.com>, Jim Blandy <jimb@redhat.com>,
	gdb <gdb@sources.redhat.com>
Subject: Re: [rfc] struct dictionary
Date: Fri, 25 Apr 2003 16:38:00 -0000	[thread overview]
Message-ID: <ro17k9ibkii.fsf@jackfruit.Stanford.EDU> (raw)
In-Reply-To: <3EA954D7.2070207@redhat.com>

On Fri, 25 Apr 2003 11:31:35 -0400, Andrew Cagney <ac131313@redhat.com> said:

> Ok, humor me ...
> http://sources.redhat.com/ml/gdb/2003-04/msg00017.html why even
> build these data structures during symbol reading?  It takes time
> and space, yet is probably never used.  Why not on-demand build this
> dictionary specialized for the block?

That sounds great to me if we can get it to work.  It's certainly
another reason to try to get the symbol lookup stuff abstracted behind
an opaque interface: it makes lazy loading of data a lot easier.

About the mdebugread stuff: personally, I don't care about it in the
slightest, so I'm happy for its performance to degrade, and it seems
little-enough used that a 2x degradation is perfectly acceptable.
After all, if anybody really cares about it, there's an easy fix:
buildsym-ify it, so that it uses the same mechanisms everybody else
does.  Having said that, I've already done the work on my branch to
convert it to an efficient dictionary mechanism (using a combination
of hashed and unsorted linear representations); it really wasn't all
that much work.

As far as special cases go, I'm much more worried about the Java one:
the mechanism that Java uses for dynamically loaded classes is
extremely fragile, and only works through a chain of unintentional
coincidences.  Basically, it creates this block that is linear, isn't
sorted, but yet satisfies BLOCK_SHOULD_SORT, but there's special-case
code in all the symbol lookup functions to look through Java blocks
linearly instead of using sorting, where the stated reasons for doing
so are, I think, not correct, and where this one block for which it
actually _is_ necessary is never mentioned.

Also, I think that C++ could benefit from having a few special-purpose
blocks like Java does, because C++ classes and namespaces aren't
naturally tied to a single file.

David Carlton
carlton@math.stanford.edu

  reply	other threads:[~2003-04-25 16:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-16 20:05 David Carlton
2003-04-25  2:17 ` Andrew Cagney
2003-04-25  2:22   ` Daniel Jacobowitz
2003-04-25  4:35   ` David Carlton
2003-04-25 15:31     ` Andrew Cagney
2003-04-25 16:38       ` David Carlton [this message]
2003-05-01 23:09         ` Andrew Cagney
2003-05-10 18:09           ` Andrew Cagney
2003-06-03  2:20             ` Elena Zannoni
2003-06-03  3:00               ` David Carlton
2003-04-29 15:10     ` Andrew Cagney
2003-04-29 19:16       ` David Carlton
2003-04-29 20:06         ` Andrew Cagney
2003-04-29 20:39           ` 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=ro17k9ibkii.fsf@jackfruit.Stanford.EDU \
    --to=carlton@math.stanford.edu \
    --cc=ac131313@redhat.com \
    --cc=ezannoni@redhat.com \
    --cc=gdb@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).