From: David Carlton <carlton@math.stanford.edu>
To: Jim Blandy <jimb@redhat.com>
Cc: gdb@sources.redhat.com
Subject: Re: suggestion for dictionary representation
Date: Tue, 24 Sep 2002 09:49:00 -0000 [thread overview]
Message-ID: <ro18z1rqqny.fsf@jackfruit.Stanford.EDU> (raw)
In-Reply-To: <200209240635.g8O6ZUC23979@zenia.red-bean.com>
On Tue, 24 Sep 2002 01:35:30 -0500, Jim Blandy <jimb@redhat.com> said:
>> Also, for what it's worth, I'm still not ready to completely give up
>> on representing members of classes via a dictionary; that would
>> provide another place where a linear dictionary environment could be
>> useful.
> I agree, but it's worth noting that `struct symbol' is 52 bytes long
> on a Pentium, whereas `struct field' and `struct fn_field' are 16
> bytes long.
> Not that that necessarily matters. We know GDB does have memory
> consumption problems, but I have never seen those problems really
> analyzed.
Right. It wouldn't be something to do lightly, but on the other hand
it's not something to rule out of hand without appropriate profiling.
One possible alternative would be to add a dictionary to each compound
data structure (or, as you suggest, only to certain compound data
structures) that knows how to test whether or not a name is in that
structure, but that always returns the same symbol for a match. That
would let us get rid of the is_a_field_of_this argument to
lookup_symbol; C++ code could then handle that symbol as a possible
return value and would have enough information to do the right thing,
whereas non-C++ code could ignore the possibility (or gdb_assert that
it was never returned), and it would work automatically with a correct
C++ name lookup algorithm.
It would, of course, still increase GDB's memory usage, but it
wouldn't increase it for every single field.
David Carlton
carlton@math.stanford.edu
next prev parent reply other threads:[~2002-09-24 16:49 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-23 23:50 Jim Blandy
2002-09-24 6:19 ` Daniel Berlin
2002-09-24 7:06 ` Daniel Jacobowitz
2002-09-24 21:01 ` Jim Blandy
2002-09-25 5:54 ` Daniel Jacobowitz
2002-09-27 11:23 ` Jim Blandy
2002-09-27 11:28 ` Daniel Jacobowitz
2002-09-24 9:49 ` David Carlton [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-09-22 19:59 Jim Blandy
2002-09-22 20:11 ` Daniel Jacobowitz
2002-09-23 10:38 ` David Carlton
2002-09-23 17:34 ` Daniel Berlin
2002-09-23 18:39 ` Daniel Jacobowitz
2002-09-23 21:28 ` Daniel Berlin
2002-09-23 21:38 ` Eli Zaretskii
2002-09-23 21:44 ` Daniel Berlin
2002-09-23 21:47 ` Eli Zaretskii
2002-09-23 21:54 ` Daniel Berlin
2002-09-24 9:33 ` David Carlton
2002-09-24 10:42 ` Daniel Berlin
2002-09-24 10:53 ` David Carlton
2002-09-24 20:01 ` Jim Blandy
2002-09-24 20:50 ` Daniel Berlin
2002-09-23 18:28 ` Daniel Jacobowitz
2002-09-24 3:51 ` Paul N. Hilfinger
2002-09-24 19:52 ` Jim Blandy
2002-09-24 20:37 ` Elena Zannoni
2002-09-24 20:53 ` Daniel Berlin
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=ro18z1rqqny.fsf@jackfruit.Stanford.EDU \
--to=carlton@math.stanford.edu \
--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