Re: [rfc][patch] Eliminate quadratic slow-down on number of solibs.

Joel Brobecker
2009-05-12T08:48:13Z

> 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