Re: Dynamic symbol table

Karl Vogel <karl.vogel-/[email protected]>
Newsgroups gmane.comp.kde.devel.optimize
Message-ID <[email protected]>
Lubos Lunak <[email protected]> wrote in
news:[email protected]: 

> 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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.