This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [rfc][patch] Eliminate quadratic slow-down on number of solibs.
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Paul Pluzhnikov <ppluzhnikov at google dot com>
- Cc: tromey at redhat dot com, gdb-patches at sourceware dot org
- Date: Tue, 12 May 2009 10:48:01 +0200
- Subject: Re: [rfc][patch] Eliminate quadratic slow-down on number of solibs.
- References: <20090420232900.2456B19C4F6@localhost> <m3y6tu24ty.fsf@fleche.redhat.com> <8ac60eac0904291411o4666b3eha30d95cc88811dd5@mail.gmail.com>
> 2009-04-29 Paul Pluzhnikov <ppluzhnikov@google.com>
>
> * breakpoint.h: Add breakpoint_re_set_objfile prototype.
>
> * breakpoint.c (breakpoint_re_set_objfile): Don't rescan
> all objfiles unnecessarily.
> (breakpoint_re_set): New function.
>
> * symfile.c (new_symfile_objfile): Call breakpoint_re_set_objfile
> instead of breakpoint_re_set.
>
> * objfiles.c (objfile_relocate): Likewise.
Looks OK to me.
Perhaps we could get rid of create_overlay_event_breakpoint entirely
by inlining it at the only location where it remains in use, and then
we can rename create_overlay_event_breakpoint_1 back to
create_overlay_event_breakpoint. Just thinking out loud, not that
it matters very much; it's just that, if it is potentially expensive
to call create_overlay_event_breakpoint because it iterates over
all objfiles, it might be beneficial to make this apparent by forcing
the caller to do the iteration (one line of code).
--
Joel