Daniel Jacobowitz wrote: > On Mon, Feb 11, 2008 at 04:41:08PM -0500, Aleksandar Ristovski wrote: >> Daniel Jacobowitz wrote: >>> On Mon, Feb 11, 2008 at 03:51:59PM -0500, Aleksandar Ristovski wrote: >>>> 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... >>> That's only part of the problem. You have this huge duplication of >>> identical partial symbols within the same block. How did that happen? >>> It shouldn't. Maybe we can avoid creating them in the first place. >>> >> Daniel, could you clarify: when you say "maybe we can avoid..." who is >> "we" - gdb or gcc? > > Probably GDB, but I don't know. Can you show me an example of these > unnecessary psymbols? > Some of them: unsigned int _GCC_ATTR_ALIGN_64t long long int _GCC_ATTR_ALIGN_u64t long long unsigned int _Int64t _Uint64t _GCC_ATTR_ALIGN_u32t unsigned int _GCC_ATTR_ALIGN_32t int _Uint32t _Int32t _GCC_ATTR_ALIGN_16t short int _GCC_ATTR_ALIGN_u16t short unsigned int _Int16t _Uint16t _GCC_ATTR_ALIGN_8t signed char _GCC_ATTR_ALIGN_u8t unsigned char _Int8t _Uint8t _Intptrt _Uintptrt _Longlong _ULonglong Additionally, please take a look at the modified patch, I have added bcache_added function to return whether it added the data or returned cached one. This way linear search is avoided.