Subject: Re: Musings on ld.elf_so and symbol lookup caching
From: David Laight <email@example.com>
Date: 10/04/2002 20:05:32
> I feel *strongly* that there is a lot of completely unnecessary (and
> is some cases, outright useless) churn in this diff. Please stick to
> functional changes.
All of the changes were done for performance reasons, and improved
the speed of some tests without slowing down others.
(Although it looks as if I left in 3 different options
in rtld_symlook_obj - the one in use is the fastest).
Also these changes are 'for comment' as much as anything, to
be used as a basis for other changes.
The changes definitely give a massive improvement to programs
that load a lot of libraries an startup.
(I also took some 'gratuitous' changes out when generating the
diff, eg removal of __P() and using function prototypes for
(eventually) unchanged functions.)
> At any rate, I do not see the special case handling for `main program'
> symbols to be particularly beneficial. It makes the simple case
> slower, and it does not help enough in some of the complex cases
> (e.g. rep or xmms, where most libraries are loaded through dlopen(3)).
It is a change that makes a big difference when there are a lot
of libraries in a single namespace. This is most likely to
happen for the main program body. I don't have rep or xmms
built, so don't know if the libraries they dlopen have long
'needed' lists for libraries that are not in the program body.
If they do then the code I wrote could very easily be
modified so that it is used for such DAGs.
I doubt you can measure the speed difference for the 'normal'
case either. Clearly the initial test could be based on
information obtained by map_object(), but that would have
'polluted' other functions and hidden some of what was going on.
David Laight: firstname.lastname@example.org