This is the mail archive of the
mailing list for the binutils project.
Re: [AArch64] Speed up linking speed by skipping unncessary TLS reloc type check
- From: Jiong Wang <jiong dot wang at arm dot com>
- To: "binutils\ at sourceware dot org" <binutils at sourceware dot org>
- Date: Thu, 06 Aug 2015 11:36:41 +0100
- Subject: Re: [AArch64] Speed up linking speed by skipping unncessary TLS reloc type check
- Authentication-results: sourceware.org; auth=none
- References: <n99lhefgf10 dot fsf at arm dot com>
Jiong Wang writes:
> When linking one application, perf shows "aarch64_can_relax_tls" consume
> about 5% CPU time, after a check, I found this function can be improved.
> It's invoked only in "aarch64_tls_transition", for normal applications
> which don't contain TLS relocations, the linker always need to go
> through the whole "or" check list.
> While at least, we can short the list by removing those TLS relocation
> types which don't need relaxation. For example all TLS local executable
> relocation types shouldn't need any TLS relaxation in current
> For that application, This patch reduce the cpu consumed by
> aarch64_can_relax_tls from 5% to about 2.5%, and reduce the overall
> linking time of that application from 4.88s to 4.55s, linking is about
> 7% faster.
> OK for trunk?
> 2015-07-17 Jiong Wang <firstname.lastname@example.org>
> * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): New.
> (aarch64_can_relax_tls): Use the new IS_AARCH64_TLS_RELAX_RELOC.
BTW, IS_AARCH64_TLS_RELAX_RELOC is actually a copy of IS_AARCH64_TLS_RELOC
while we remove all those relocation types which don't need TLS
relaxation. So this patch should be safe to install.