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: [RFC][patch] Avoid repeated calls to solib_add on initial attach.


Paul Pluzhnikov wrote:
> Following up on my earlier "slow on high-latency links" message:
> http://sourceware.org/ml/gdb-patches/2011-07/msg00391.html ...
> 
> Attached patch avoids calling solib_add twice when initially attaching
> inferior.
> 
> I am not entirely happy about this patch, but don't have a better
> idea for a fix, and do want to avoid repeated rescans of the shared
> library list.
> 
> (Some of our executables use 4000+ shared libraries, and the time in
> solib_add does add up.)
> 
> Tested on Linux/x86_64, no regressions.
> 
> Comments?

I've had a look at this and aside from the typo noted below it seems
fine.  I didn't see any speedup on the 1000 library testcase I've been
using for my own stuff (the bulk of the time seemed to be printing all
the "Loaded symbols for X.so" and "Reading symbols from X.so"
messages) but maybe this is because I'm running everything locally and
possibly you are not?  In any event, the second solib_add call was
skipped as expected.

>  	 made all the inferior hook methods consistent, this call could be
>  	 removed.  Call it only after the solib target has been initialized by
> -	 solib_create_inferior_hook.  */
> +	 solib_create_inferior_hook.  Only do this if not alreay done from
                                                          ^^^^^^
							  Typo

Cheers,
Gary

-- 
http://gbenson.net/


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