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).


> 3. The "don't reset all breakpoints over and over when adding
>    multiple solibs" patch here:
>    http://sourceware.org/ml/gdb-patches/2009-05/msg00097.html
> 
>    This patch feels like a hack, but does save significant additional
>    CPU cycles (even after patches #1 and #2 above) and transforms
>    breakpoint reset operation from O(N*N) into O(N) where N is the
>    number of solibs added "at once" (such as at program startup). It
>    is not clear how to make this less of a hack :-(

I completely misunderstood this change you proposed! I see now what
you are doing. This wouldn't help on systems such as Windows where
DLLs are "discovered" through special events while waiting for inferior
events.  So shared libraries are never loaded at once, neither during
startup or attaching.  But on GNU/Linux, however, you're right, there
is something to do in that case.

I'd like to think about it, for a while... I wonder if we could use
an observer to notify clients that symbols have been loaded, rather
than calling breakpoint_re_set directly.

> 4. Joel's proposal (if I understood it correctly) to extend patch#3

This proposal was a direct consequence of my misunderstanding. It might
still have some merit on its own, but I don't think it is necessary
(I thought that your change could cause incorrect behavior).

-- 
Joel


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