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] Do not add partial_symbol again and again to the list


Daniel Jacobowitz wrote:
On Mon, Feb 11, 2008 at 03:23:35PM -0500, Aleksandar Ristovski wrote:
The attached patch checks if partial_symbol has already been added to the list instead of adding duplicate records.

How does this ever happen? It seems very wrong. Also, I am worried that the linear search will be a bottleneck (this is quadratic as each psymtab grows).

Yes, I understand your concern about the complexity... but...


As a reference point, the binary I was mentioning here:
http://sourceware.org/ml/gdb-patches/2008-02/msg00174.html
with 9M+ partial symbols, after the patch it dropped to below 100K partial symbols:
Statistics:
    Number of psymtabs         :    16659
    Number of global symbols   :    98286
    Number of static symbols   :    59275
    Number of glob. sym. sorts :        4

Now the sorting is much less costly.



Even easier: eliminate the copy entirely.  SYMBOL_SET_NAMES -> symbol_set_names
already does this and it never modifies its argument.

I will take a look.


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