[rfa] symbol hashing, part 1/n - updates to hash functions
Elena Zannoni
ezannoni@cygnus.com
Fri Oct 12 08:54:00 GMT 2001
Daniel Berlin writes:
>
> On Thursday, October 11, 2001, at 07:58 PM, Elena Zannoni wrote:
>
> > Daniel Jacobowitz writes:
> >> This patch still has two logical parts; if you strongly prefer I can
> >> break
> >> it up further, but they are somewhat intertwined and I think neither
> >> should
> >> be objectionable. They are:
> >> - Fix a looping bug in msymbol_hash_iw. It would not stop on '(' if
> >> there
> >> was whitespace before it.
> >> - Update to use the identifier hash function that libiberty uses, and
> >> more buckets.
> >>
> >> Is this OK?
> >
> > Looks ok to me in theory. Except that, why was the
> >
> > '% MINIMAL_SYMBOL_HASH_SIZE;'
> >
> > bit moved outside of the msymbol_hash and msymbol_hash_iw functions?
> So msymbol_hash and hash_iw could be used elsewhere.
I see, can we leave the "% MINIMAL_SYMBOL_HASH_SIZE;" where it was
then, until we get to the next patch?
>
> > You still do the same operation with the results returned by the two
> > functions anyway.
> >
> Except, now they are just hash functions, not hash functions that only
> work for the minsym hash tables.
>
Right, OK.
> > Also, where are these 2 functions used besides mynsyms.c?
> In a further symbol hashing patch, unless he changed it.
>
All right. Then the changes to the '%' thing should be put in the
future patch.
> > I think we
> > should make them static and remove the extern from symtab.h.
> >
>
> > Can you give me an example where the '(' error comes up? (Just so I
> > understand it better). How did you come up with the number of
> > buckets?
>
> Averaging based on a large number of gnome, kde, and other real
> applications (ie emacs), compiled with debug info.
> 349 is way too small, we ended up with chains > length 100, all the time.
>
OK.
> > Is this also used in libiberty?
>
> Which, the hash function?
> > Can you fix it and resubmit?
> >
Never mind, I meant the number of buckets. But you answered that.
Elena
More information about the Gdb-patches
mailing list