[PATCH] D25766: [ELF] - Implemented --section-ordering-file option.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 31 06:12:58 PDT 2016


So latest results are:

Using Rafaels script I was able to produce ~300 symbols file (https://justpaste.it/zwm4).
I think that is not the best file that is possible to build. On my VM amount of entries was just 0 - 5,
because I guess binary executed too fast on VM hardware I use. 
I used different old hardware to produce that file, but it probably
can be improved just by slow down of CPU frequency to get more samples. 
Anyways even that 300 symbols file was enough to see difference.

I used clang -help for benchmarking of https://reviews.llvm.org/D26130 patch.
Numbers for 1000 runs of ordered and unordered build are 636 vs 641 +- 0.01%.
What amazed me is that I tried testing both on VM and real (different) hardware, and
after that 1000 runs number of pagefaults is equal ! I had 636/641 on 2 different pc !

Time was (from real HW) 0.124324230 vs 0.127807916 (+- 0.2%), so it is 2.8% boost.

Command line for unordered build was:
-DCMAKE_BUILD_TYPE=Release -DLLVM_PARALLEL_COMPILE_JOBS=8 -DLLVM_ENABLE_THREADS=true -DCMAKE_CXX_FLAGS="-fuse-ld=lld -fPIC -std=c++11 -ffunction-sections -fdata-sections" -DCMAKE_C_FLAGS="-fuse-ld=lld -fPIC -ffunction-sections -fdata-sections" -DCMAKE_C_COMPILER=/home/umb/LLVM/build/bin/clang -DCMAKE_CXX_COMPILER=/home/umb/LLVM/build/bin/clang++

For ordered it was:
-DCMAKE_BUILD_TYPE=Release -DLLVM_PARALLEL_COMPILE_JOBS=8 -DLLVM_ENABLE_THREADS=true -DCMAKE_CXX_FLAGS="-fuse-ld=lld -fPIC -std=c++11 -ffunction-sections -fdata-sections -Wl,--symbol-ordering-file,/home/umb/tests/syms" -DCMAKE_C_FLAGS="-fuse-ld=lld -fPIC -ffunction-sections -fdata-sections -Wl,--symbol-ordering-file,/home/umb/tests/syms" -DCMAKE_C_COMPILER=/home/umb/LLVM/build/bin/clang -DCMAKE_CXX_COMPILER=/home/umb/LLVM/build/bin/clang++

Now I am going to cleanup the patch and add testcases.

George.


More information about the llvm-commits mailing list