[PATCH] D19528: [ELF] - Implemented -z combrelocs/nocombreloc.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Fri May 6 16:39:56 PDT 2016


>I was able to manually apply it.
>
>What I did was:
>
>* build clang with shared libraries.
>* time with
 >sudo schedtool -F -p 99 -a 0x4 -e perf stat -r 10 ./bin/clang
>* build the patched version of lld
>* delete bin/clang-3.9 and lib/*.so
>* link again
>* time the result
>
>What I got was
>
>* trunk: 0.059005660
>* sort on RELATIVE, Symbol, offset, type: 0.040090757
>* sort on Symbol, offset, type: 0.042367124
>* sort on offset, type: 0.059119353
>* sort on RELATIVE, Symbol, offset: 0.040131764
>* sort on RELATIVE, Symbol: 0.040396584
>* sort on RELATIVE: 0.058322444
>* sort on Symbol: 0.039886032
>
>So it looks like the only thing that makes a difference is the symbol.
>
>BTW, one cannot sort .rel.plt, it would be nice to document why.
>I think it is better to use stable_sort to be sure we have a
>deterministic output without checking fields that don't make a
>difference.
>
>So a change sorting only by symbol with stable sort LGTM. Please make
>sure you are not computing the number of relative rolocations or
>setting any DT_*.
>
>The partial apply that I used for benchmarking was.
>

I'll update the patch a bit later then for final review. 

At the same time I got 10% difference in startup cycles
when compared with DT_* vs without: http://reviews.llvm.org/D19528#416734
Do you think that was an computing error ?    


More information about the llvm-commits mailing list