Dynamic symbol table
Karl Vogel
karl.vogel at seagha.com
Fri Jul 16 14:00:12 CEST 2004
Lubos Lunak <l.lunak at suse.cz> wrote in
news:200407161252.49575.l.lunak at suse.cz:
> On Friday 16 of July 2004 12:40, Waldo Bastian wrote:
>> Would be nice if someone could look into that. Just having a somewhat
>> convenient to use tool to identify the hot code would already be a
>> step forward.
>
> Note that ld.so in SUSE9.1 loads whole binary at once into memory
> instead of
> paging it in as needed, which reduces seeking (can be disabled by
> $LD_NOMADVISE). This was discussed here few months back. I'm not sure
> if this feature has made it into official glibc yet.
Really?! This seems like a bad idea to me! I did a preload test with
madvise() on all linked libs and well it took a lot longer than demand
paging the libs.. afterall.. you're reading alot of data that isn't needed
directly.
For systems with gobs of memory and fast disks, I can understand the
advantage.. but there are still systems with slow disks (laptops) and low
memory.
If I'm not mistaken.. Windows XP records the pages that are used during the
first 3 seconds of an executable, and preloads those on the next execute.
(it's also tied into the defragmenter, so that those pages are kept
together on disk).
Creating a ".startup" ELF section and only preloading/madvise()'ing that
would be something similar and it would be do'able without too much code
effort (see my mail concerning the gcc flags).
Karl.
More information about the Kde-optimize
mailing list