This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Eliminate quadratic slow-down on number of solibs (part 2).
- From: Tom Tromey <tromey at redhat dot com>
- To: Paul Pluzhnikov <ppluzhnikov at google dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 03 Jun 2009 15:34:09 -0600
- Subject: Re: [patch] Eliminate quadratic slow-down on number of solibs (part 2).
- References: <8ac60eac0905051749p3b5d14d9q8903b9de8e18137f@mail.gmail.com> <m3iqjjxse2.fsf@fleche.redhat.com> <8ac60eac0906031245v4db0ae38ubeee91d49611851f@mail.gmail.com>
- Reply-to: Tom Tromey <tromey at redhat dot com>
>>>>> "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