[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-optimize
Subject:    Re: Dynamic symbol table
From:       Waldo Bastian <bastian () kde ! org>
Date:       2004-07-16 10:40:02
Message-ID: 200407161240.05780.bastian () kde ! org
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Friday 16 July 2004 12:09, Karl Vogel wrote:
> Oh that's right.. strace can also trace through fork.. forgot about that.
> Lol.. would probably have been more sensible to use strace than to hack my
> kernel to log open() calls.. but it also worked :-)
>
> What I was trying to figure out, is whether loading of binaries is having a
> negative effect on start time.
>
> One should be able to speed up the start time of binaries by putting the
> initial startup code together, which means it will most likely be together
> on disk also, which ultimately reduces I/O's.
>
> By (ab)using GCC's -fprofile-arcs & -fbranch-probabilities, it is possible
> to put the start code in a different ELF section than the rest of the code.
>
> The idea:
> * add option to kde exe to directly stop after KApplication() setup
> * compile exe with -O2 -fprofile-arcs
> * start kde exe with the new stop option
> * the profiled exe will dump stats to 'exename.da'
> * compile exe with -O2 -fbranch-probabilities
>
> => gcc will now have put the startup code in section 'text.hot' and the
> rest in 'text.unlikely'. So the startup code will be all together in the
> exe, meaning less head seeking, less I/O & faster load. (and afterwards a
> smaller RSS is needed to run the app)

Yes, I once did some function reordering based on first usage and that showed 
indeed some improvement, but I didn't manage to find a convenient way to do 
that on a larger scale.

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.

Cheers,
Waldo
- -- 
bastian@kde.org  |   KDE Community World Summit 2004  |  bastian@suse.com
bastian@kde.org  | 21-29 August, Ludwigsburg, Germany |  bastian@suse.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQFA97CFN4pvrENfboIRAlQnAJsGd+sL6ZddYsyCbk/oe8cGZCWfWQCgoToL
uQglNxCx6ImRHv00knBG508=
=sRs9
-----END PGP SIGNATURE-----
_______________________________________________
Kde-optimize mailing list
Kde-optimize@kde.org
https://mail.kde.org/mailman/listinfo/kde-optimize

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic