This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc 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]

[Bug dynamic-link/15310] _dl_sort_fini is O(n^3) causing slow exit when many dsos


http://sourceware.org/bugzilla/show_bug.cgi?id=15310

--- Comment #11 from Don Hatch <dhatch at ilm dot com> 2013-03-28 10:00:12 UTC ---
Created attachment 6955
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6955
Proposed initial patch, rearranging init/fini sorting in prep for overhaul.
diffs from master at 7a86be6

Here's the proposed initial patch.
Commit message would be something like:
==========================================================================
Refactor ld.so init/fini sorting code in preparation for overhaul.

- Init sorting code was in two places: dl-open.c and dl-deps.c;
  it was identical in both places except for the starting index
  which was i0=0 in dl-open.c and i0=1 in dl-deps.c.
  Moved this common code out into a new function _dl_sort_init
  that takes i0 as a parameter.

- Moved _dl_sort_init and _dl_sort_fini out into two new files
  dl-sort-init.c and dl-sort-fini.c.
  This allows easy diffing between the two (which can be interesting)
  and may also help facilitate future efforts to unit test
  these two functions.

No functional change here.
==========================================================================

I don't have the copyright agreement in place yet, but it seems to me
that I'm not introducing any copyrightable material in this initial patch--
I'm just moving existing code around.
(okay I did add a comment at the top of each function).

Let me know if I'm doing this right...

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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