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

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 29 05:52:18 PDT 2016


grimar added a comment.

Below are first benchmark result I got:

// used release shared build of clang:
// -DCMAKE_BUILD_TYPE=Release -DLLVM_BUILD_LLVM_DYLIB=true -DBUILD_SHARED_LIBS=true
// OS: Ubuntu 16.04 LTS 64bit.
// Each time I run test 5 times and selected average by total startup time result:

// 1. With this full patch:
umb at ubuntu:~/umb/LLVM/self-host-my-shared/bin$ LD_DEBUG=statistics ./clang

  42269:	
  42269:	runtime linker statistics:
  42269:	  total startup time in dynamic loader: 102686501 cycles
  42269:		    time needed for relocation: 78691443 cycles (76.6%)
  42269:	                 number of relocations: 15077
  42269:	      number of relocations from cache: 14659
  42269:	        number of relative relocations: 136769
  42269:		   time needed to load objects: 22087834 cycles (21.5%)

clang-3.9: error: no input files

// 2. Without this patch:
umb at ubuntu:~/umb/LLVM/self-host-orig-shared/bin$ LD_DEBUG=statistics ./clang

  42265:	
  42265:	runtime linker statistics:
  42265:	  total startup time in dynamic loader: 151284557 cycles
  42265:		    time needed for relocation: 127451126 cycles (84.2%)
  42265:	                 number of relocations: 27492
  42265:	      number of relocations from cache: 2244
  42265:	        number of relative relocations: 2020
  42265:		   time needed to load objects: 21858213 cycles (14.4%)

clang-3.9: error: no input files
// Amount of startup time cycles wo/patch patch is 1.47x in compare with w/patch.
// Time needed for relocations is 1.61x.

// 3. With this patch, but do not set DT_RELACOUNT tag:
umb at ubuntu:~/umb/LLVM/self-hosting-notag/bin$ LD_DEBUG=statistics ./clang

  101488:	
  101488:	runtime linker statistics:
  101488:	  total startup time in dynamic loader: 111007425 cycles
  101488:		    time needed for relocation: 87371019 cycles (78.7%)
  101488:	                 number of relocations: 15077
  101488:	      number of relocations from cache: 14659
  101488:	        number of relative relocations: 2020
  101488:		   time needed to load objects: 21857215 cycles (19.6%)

clang-3.9: error: no input files
// ~8% more startup cycles than (1).
// ~11% more relocation time cycles than (1).

Now I am going to test static -pie build.


http://reviews.llvm.org/D19528





More information about the llvm-commits mailing list