This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Slow linking for ARM


Titus,

On Wed, Dec 22, 2010 at 11:50 AM, Titus von Boxberg <titus@v9g.de> wrote:
> Bryan, all,
>
> Am 21.12.2010 um 17:40 schrieb Bryan Hundven:
>
>> On Tue, Dec 21, 2010 at 2:58 AM, Titus von Boxberg <titus@v9g.de> wrote:
>>> Hi all,
>>>
>>> does anybody know why linking for ARM cpus
>>> is much slower than for others?
>>> I'm using tool chains for ELF/Linux/glibc
>>> for X86, PowerPC and ARM.
>>> binutils is of version 2.20
>>
>> Have you tried 2.20.1 or 2.21?
>> I'd say if the problem still exists there, try posting something to:
>> http://sourceware.org/ml/binutils/
>>
>> I've been building for the same architectures (ppc for e500, arm for
>> xscale). Granted I've been more concerned with functionality over
>> compile time, but next time I build, I will try comparing build times.
> Yes, that's sensible. But if only linking a single not overly complex
> application takes 200s I think also you would be concerned with
> build times ;-)

Or maybe I'm not having the same issue as you, so I don't notice.
Maybe this is a sub-architecture specific issue?
What cpu is your toolchain (un)optimized to output?
Maybe I could build the same thing, and compare with my xscale
(armv5te) toolchain.

> I gathered some more statistics today.
> - the factor between ARM and other archs varies wildly between
> Â2 and 25. I also got no clue for the reason of the variation
> Âof the factor ARM<->other archs for different applications.
> - gold of 2.20 does not work, at least for ARM.
>
> With a build of HEAD of binutils from today,
> - ld's linking time for the 200s-app from above is reduced to approx 12 s
> - gold seems to work, and reduces the linking time further by a factor
> Âof about 4
> - HEAD-ARM-ld's linking time is still about factor 2 longer than that of
> Âld-2.20 for the other archs when measured with the application that
> Âtook 200s.
>
> A comparison of gold for the architectures would be next.
>
> Though with binutils-HEAD the problem is not as dramatic as before,
> I still would be interested to know the reason. Factor of 25 sounds
> like a good CS classroom example.

Sounds like an interesting challenge. I'm game! :-)

>>
>>> Linking the same software is about 4 times slower
>>> for ARM than for the other CPUs.
>>> What might be the reason?
>>
>> If you could give an example of a package you are building, I will
>> build the same package and compare build times. Hopefully then we can
>> start to dig into the problem.
> As a test apart from my company's own software,
> I used the http server example of asio today, and got a factor of 2
> between ARM and other archs (though linking time is quite short
> in total: 0.21s user for PPC/X86 and 0.45 s user for ARM on a
> 2GHz Core 2 Duo Mac using binutils-2.20).

So your building apache2? lighttpd? custom httpd server?
Just curious so I can repo the problem, and eventually start to provide help.

> Regards
> Titus
>
>

Cheers,

-Bryan

--
For unsubscribe information see http://sourceware.org/lists.html#faq


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]