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).
On Thu, May 21, 2009 at 8:15 AM, Joel Brobecker <brobecker@adacore.com> wrote:
> I lost track a little. Are there still some patches pending review
> in this series?
Yes, the "hacky patch":
http://sourceware.org/ml/gdb-patches/2009-05/msg00097.html
saves additional 15% of CPU, because it avoids resetting the breakpoint
on every solib addition, when many solibs are added "at once" (this happens
at program startup/attach on UNIXen, but not on Windows).
Resetting a breakpoint involves non-trivial amount of computation:
bp->addr_string is re-parsed, symbol is looked up, sal's are evaluated, and
finally the breakpoint (on main) is reset to exactly the same location it
were before :-(
I am not happy with the "hackiness" of this patch, but don't see how to
fix this better.
Thanks,
--
Paul Pluzhnikov