This is the mail archive of the gdb-patches@sourceware.org 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]
Other format: [Raw text]

Re: [PATCH 1/5] gdb/23712: Introduce multidictionary's


>>>>> "Keith" == Keith Seitz <keiths@redhat.com> writes:

Keith> gdb/23712 is a new manifestation of the now-infamous (at least to me)
Keith> symtab/23010 assertion failure (DICT_LANGUAGE == SYMBOL_LANGAUGE).

Keith> I've done exhaustive performance testing with this approach, and I've
Keith> attempted to minimize the overhead for the (overwhelmingly) most common
Keith> one-language scenario.

I'm not super concerned about this.

I wonder a bit more about the memory overhead, though.

Keith> [I've tested only GDB and firefox with -readnow.]

In general my view is that -readnow performance just isn't important,
since no users should ever do that, and CU expansion is rarely
noticeable anyhow.  (And, if CU expansion performance is a problem, I'll
note there are some relatively simple ways to greatly speed it up that
we have never seriously pursued.)

Keith> +struct multidictionary
Keith> +{
Keith> +  /* An array of dictionaries, one per language.  All dictionaries
Keith> +     must be of the same type.  This should be free'd for expandable
Keith> +     dictionary types.  */
Keith> +  struct dictionary **dictionaries;
Keith> +
Keith> +  /* The number of language dictionaries currently allocated.
Keith> +     Only used for expandable dictionaries.  */
Keith> +  unsigned short n_allocated_dictionaries;
Keith> +};

I think this is the main possibly contentious bit of this series.

I wondered when reading this series why it isn't possible to just put
symbols of multiple languages into a single hash table.  That would seem
to make the series as a whole much simpler: no mass renaming, no need to
store multiple dictionaries in a block, etc.

Maybe one problem is that when searching you may only have the
searched-for symbol name; so you'd have to maybe keep a bitset of all
the languages in a dictionary and then do multiple hash lookups?  But
still that seems better.

Don't rush off to change anything yet!  I'd rather we discuss it before
asking for more work.  Also I'd appreciate opinions from anybody else
listening.

thanks,
Tom


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