This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: DLL loading performance
- From: Kai Tietz <ktietz70 at googlemail dot com>
- To: pascal at obry dot net
- Cc: binutils at sourceware dot org
- Date: Tue, 20 Mar 2012 18:04:51 +0100
- Subject: Re: DLL loading performance
- References: <4F68B72E.5060404@obry.net>
Hi Pascal,
this is no binutils issue. It is a runtime issue. We on mingw-w64
have a fix for that in our repository. Issue was (or is still for
ventures using older pseudo-relocation code) that too often
access-rights for sections were modified. By simple hashing this,
things speed-up again.
Regards,
Kai
2012/3/20 Pascal Obry <pascal@obry.net>:
>
> Hi there!
>
> Another performance issue but this time it is a load time performance.
> That is the time to load dynamically a DLL has regressed by a factor of 50.
>
> My current investigation point to this commit:
>
> <<
> commit f7a18150a5b93a8efce08e76b00b4f3a4a04c151
> Author: Kai Tietz <kai.tietz@onevision.com>
> Date: ? Fri Nov 6 15:50:55 2009 +0000
>
> ? ?2009-11-06 ?Kai Tietz ?<kai.tietz@onevision.com>
>
> ? ? ? ? ? ?* pe.em (DEFAULT_PSEUDO_RELOC_VERSION): New macro.
> ? ? ? ? ? ?(gld_XXX_before_parse): Set pseudo-relocation default
> ? ? ? ? ? ?version to DEFAULT_PSEUDO_RELOC_VERSION.
> ? ? ? ? ? ?(gldXXX_handle_option): Likewise.
>>>
>
> Indeed a linker (not changing the compiler) build before this date
> create a DLL which loads (just calling Win32 LoadLibrary) in 0.8s and a
> linker built after this commit create a DLL which loads in 40s.
>
> This TN move 32bits Windows from runtime pseudo reloc v1 to v2.
>
> Does this rings a bell? Any idea to what could be so slow in v2? Any
> information about v1 vs v2, what has been changed?
>
> If I want to debug this, where should I start looking?
>
> Thanks in advance for any assistance resolving this issue.
>
> Pascal.
>
> --
>
> --|------------------------------------------------------
> --| Pascal Obry ? ? ? ? ? ? ? ? ? ? ? ? ? Team-Ada Member
> --| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
> --|------------------------------------------------------
> --| ? ?http://www.obry.net ?- ?http://v2p.fr.eu.org
> --| "The best way to travel is by means of imagination"
> --|
> --| gpg --keyserver keys.gnupg.net --recv-key F949BD3B
>
--
|? (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination