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] |
André Pönitz wrote: > On Thu, Jul 19, 2012 at 04:19:13PM +0100, Gary Benson wrote: > > Attached is a patch to avoid calling update_section_map from the > > probes interface. Updated timings are as follows: > > > > no of solibs 100 250 500 1000 2000 5000 > > ------------------------------------------------------------ > > old interface 1 3 9 35 141 942 > > new interface 0 0 1 4 14 89 > > (times in seconds) > > > > So, with this patch GDB is not three but ten times faster. > > It pretty much looks like there is still some quadratic behaviour > somewhere... Yes. It's difficult to avoid given the current architecture. target_so_ops->current_sos() is expected to return a freshly allocated list of libraries to update_solib_list(), and the latter is expected to free them. This makes sense for the standard interface, which reads everything from the inferior into a list and returns it. The probes interface already has everything read by the time target_so_ops->current_sos() is called, but it can't just return its own copy because the rest of GDB will start freeing bits of it, so it needs to copy it. Every time a library is loaded, a new copy of the list is made, but every time a library is loaded the list is one element bigger. You can see all the memcpy calls in the profile I attached. Cheers, Gary -- http://gbenson.net/
Attachment:
profile
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |