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] Eliminate quadratic slow-down on number of solibs (part 2).


>>>>> "Paul" == Paul Pluzhnikov <ppluzhnikov@google.com> writes:

Paul> The problem is that the call chain is deep:

Yeah, but it can be simplified.

Paul> #3  0x00000000004e3ee5 in symbol_file_add_from_bfd (abfd=0xd57fe0,
Paul>     from_tty=0, addrs=0x0, mainline=0, flags=<value optimized out>)
Paul>     at ../../src/gdb/symfile.c:1103
Paul> #4  0x00000000004e3812 in symbol_file_add_with_addrs_or_offsets (
Paul>     abfd=<value optimized out>, from_tty=0, addrs=0xa62410,
Paul>     offsets=0x0, num_offsets=0, mainline=0,
Paul>     flags=<value optimized out>) at ../../src/gdb/symfile.c:1033
Paul> #5  0x00000000004e3ee5 in symbol_file_add_from_bfd (abfd=0xd57fe0,
Paul>     from_tty=0, addrs=0x0, mainline=0, flags=<value optimized out>)
Paul>     at ../../src/gdb/symfile.c:1103

These are all just forwarding calls, basically overloads.
You could add a new overload just for this purpose.

Paul> #6  0x0000000000462070 in symbol_add_stub (arg=<value optimized out>)
Paul>     at ../../src/gdb/solib.c:470
Paul> #7  0x00000000004fdf8b in catch_errors (
Paul>     func=0x461ff0 <symbol_add_stub>, func_args=0xae7a10,
Paul>     errstring=0x658e68 "Error while reading shared library
Paul> symbols:\n", mask=<value optimized out>) at
Paul> ../../src/gdb/exceptions.c:510

These could be turned into a TRY_CATCH inside solib_read_symbols.
symbol_add_stub is only called from a single place.

Tom


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