This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Proposal: convert function definitions to prototyped form

On Tue, 13 Jun 2000, Anatoly Vorobey wrote:

> On Mon, Jun 12, 2000 at 06:23:27PM -0700, Daniel Berlin wrote:
> > Before my patches to eliminate duplicate dwarf2 info, it said there were
> > 120k. 
> > So something isn't adding up here. 
> How do you eliminate them? The vast majority of types in debug info
> are duplicate header file types coming from different source files.
> Reducing this should cut the number much more drastically than
> from 120k to 80k. I'd say by factor of 8 at the very least. 

I have a simple hash table, 4096 entries right now.
before we read a type die, we see if the name of the type is in the hash
table (C++ ODR lets me, nobody with a C program has complained they have
the same type in multiple translation units that isn't really the same
type. I suspect it would break other stuff anyway), if it is, we use the
type in the hash table.
Otherwise, we enter it into the hash table.
If it's in the hash table, but the name doesn't match, i have some code
(not in gdb 5.0, because it's
noisy and only for profiling, obviously) to tell me it's a collision.
No collisions found.

Theoretically, this should remove all duplicate type info being read in if
there aren't any collisions.

So something else is making them, most likely lookup_pointer_type or

I guess part of the problem is that we can't free types.

But i still think we generate way too many types.

> That would mean around one type name per 400 lines of code. Since almost all
> type declarations are in header files which are about 1/10 of all sources
> in size, it looks reasonable. 
> -- 
> Anatoly Vorobey,
> "Angels can fly because they take themselves lightly" - G.K.Chesterton

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]