From: David Carlton <carlton@math.stanford.edu>
To: Daniel Berlin <dberlin@dberlin.org>
Cc: gdb <gdb@sources.redhat.com>
Subject: Re: struct environment
Date: Tue, 17 Sep 2002 13:24:00 -0000 [thread overview]
Message-ID: <ro1ptvce55n.fsf@jackfruit.Stanford.EDU> (raw)
In-Reply-To: <A4C19322-CA76-11D6-9548-000393575BCC@dberlin.org>
On Tue, 17 Sep 2002 15:49:57 -0400, Daniel Berlin <dberlin@dberlin.org> said:
>> Personally, I'd rather tighten up the interface to symbol lookups
>> first and only then move on to optimizations like changing how
>> reading in a part of the symbol information is implemented.
> These are [not? - DBC] orthogonal issues. Reading in part of the
> symbol information is *not* an optimization (as the source stands
> now). It is a necessity controlled *by the symbol lookup*.
> If psymtabs were private to stabs, then this would not be the cast
> anymore, but as it stands now, the readin of psymtabs and conversion
> to symtabs is controlled by the symbol lookup functions.
Right. So you juggle the layers by which global symbol lookups
happen, leaving the implementation more or less the same as it
currently is but designing the interface so that it supports future
flexibility. For example, we could modify the current design to,
rather than first search all the symtabs and then all the psymtabs,
search each file's symtab and psymtab (and minimal symbol table)
before moving on to the next file. (And yes, I know that we have to
get rid of the idea of searching every single file: that's a somewhat
separate issue, and the above should only be taken as a general
illustration rather than a precise suggestion.) That's 'tighten[ing]
up the interface to symbol lookups'. Then, eventually, you think
about ways in which to actually use that flexibility to optimize the
process.
I'm not saying that the interface design shouldn't keep in mind future
possible changes. I'm just saying that I don't want to wait until
those changes are in place before changing the interface.
>> For struct block, I'm tracking existing design extremely closely.
> No offense, but you shouldn't do that. The current design does
> *not* scale. Or at least, not until hash tables were introduced,
> which happened in the past 3 months.
> I've only tested scaling of hash tables up to 100 meg of debug
> info. Even then, due to the number of blocks one has to search,
> things start to get a bit slow. There are plenty of projects these
> days with 500 or 1 gig of debug info.
Yes. But are there plenty of projects with a single block with a
gigabyte of debug info? I put the words 'for struct block' in there
for a reason: the current design of the global environment doesn't
scale. But I don't think struct block has the same problems right
now.
And, even if it does, I repeat what I said above: it makes sense to me
to first redesign the interface to make it more flexible, and to leave
less-pressing optimizations to a later stage. (For global symbols,
not searching all files is more pressing whereas not requiring the
current psytab->symtab stuff is less pressing.)
Part of my motivation behind this design is to make it very easy to
change the way you're storing data in a dictionary. So if, 5 years
from now, we run into blocks for which the current mechanisms really
don't work, the changes that I'm doing now will make it much easier to
change the way those blocks are implemented.
>> Most of these can't grow, but jv-lang.c and mdebugread.c both have
>> code by which lists can grow.
>> When the struct block conversion is done, the only change will be
>> that sorted lists will go away (since they're only used by
>> mdebugread.c, which should be converted over to using hash tables
>> instead), and that the common code in jv-lang.c and mdebugread.c to
>> allow lists that grow will all be in one place. No other changes:
>> extremely similar data structures, exactly the same algorithms.
> Which haven't served particularly well for the past 5 years (before
> that, maybe).
> No offense, and not your fault. And i'm not saying they *aren't*
> adequate. It just needs more thought than "it's currently done this
> way, thus, we should do it that way in the future".
What do you think my motivations are for introducing a special case
just to handle mdebugread.c and jv-lang.c? That last sentence of
yours above really isn't a very good representation of my thought
process.
>> But it is, I think, a bad idea if we miss a symbol that we should
>> find, or if we return the wrong symbol instead of the right one.
> Which is what happens if you don't track the name lookup rules
> perfectly.
> The rules specify what is ill formed. If you find symbols you
> shouldn't, it's not only confusing to the user, it's the wrong
> symbol.
Maybe. But it's what we do right now: if we don't find a symbol in a
global block, we search all the static blocks. My first reaction was
that that's a bad idea; after thinking about it for a while, I'm much
less sure. Certainly when I get down to more concrete design on
global symbol stuff, I'll raise this issue on the mailing list.
David Carlton
carlton@math.stanford.edu
next prev parent reply other threads:[~2002-09-17 20:24 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-05 13:50 David Carlton
2002-09-06 8:06 ` Daniel Jacobowitz
2002-09-06 10:20 ` David Carlton
2002-09-06 10:57 ` Daniel Jacobowitz
2002-09-06 11:56 ` David Carlton
2002-09-06 12:34 ` Daniel Berlin
2002-09-06 12:41 ` Daniel Jacobowitz
2002-09-06 12:55 ` Daniel Berlin
2002-09-11 11:33 ` David Carlton
2002-09-11 11:36 ` Daniel Jacobowitz
2002-09-11 12:27 ` David Carlton
2002-09-06 14:43 ` David Carlton
2002-09-06 14:46 ` Daniel Jacobowitz
2002-09-06 14:57 ` mdebugread.c (was Re: struct environment) David Carlton
2002-09-06 15:35 ` Daniel Jacobowitz
2002-09-10 17:25 ` struct environment David Carlton
2002-09-10 17:31 ` Daniel Jacobowitz
2002-09-11 10:29 ` David Carlton
2002-09-11 10:55 ` Daniel Jacobowitz
2002-09-11 12:33 ` Daniel Berlin
2002-09-10 17:36 ` David Carlton
2002-09-16 22:03 ` Andrew Cagney
2002-09-06 15:00 ` David Carlton
2002-09-06 16:37 ` Tom Tromey
2002-09-06 17:19 ` David Carlton
2002-09-07 10:26 ` Per Bothner
2002-09-07 10:32 ` Daniel Jacobowitz
2002-09-09 11:18 ` David Carlton
2002-09-12 12:26 ` Andrew Cagney
2002-09-13 9:44 ` David Carlton
2002-09-17 0:48 ` Andrew Cagney
2002-09-17 6:41 ` Daniel Jacobowitz
2002-09-17 8:59 ` Andrew Cagney
2002-09-17 9:07 ` Daniel Jacobowitz
2002-09-17 10:54 ` Andrew Cagney
2002-09-17 11:02 ` Daniel Jacobowitz
2002-09-17 12:37 ` Andrew Cagney
2002-09-17 12:41 ` Daniel Jacobowitz
2002-09-18 8:13 ` Andrew Cagney
2002-09-17 12:52 ` Daniel Berlin
2002-09-17 13:34 ` Daniel Jacobowitz
2002-09-17 21:51 ` Daniel Berlin
2002-09-18 7:26 ` Daniel Jacobowitz
2002-09-18 9:08 ` David Carlton
2002-09-17 12:18 ` David Carlton
2002-09-17 10:29 ` David Carlton
2002-09-17 12:50 ` Daniel Berlin
2002-09-17 13:24 ` David Carlton [this message]
2002-09-18 22:26 ` Eli Zaretskii
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=ro1ptvce55n.fsf@jackfruit.Stanford.EDU \
--to=carlton@math.stanford.edu \
--cc=dberlin@dberlin.org \
--cc=gdb@sources.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