summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/support
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2016-05-01 04:55:03 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2016-05-01 04:55:03 +0000
commit4f9527065c6f2168979237c50089738ab5167562 (patch)
tree4ab06cce0b790dd5e583ff1d7bf8a943e445b125 /lldb/packages/Python/lldbsuite/support
parentf2f00fb11ac2d2708f727f11269c20a3cba75fe5 (diff)
downloadbcm5719-llvm-4f9527065c6f2168979237c50089738ab5167562.tar.gz
bcm5719-llvm-4f9527065c6f2168979237c50089738ab5167562.zip
ELF: New symbol table design.
This patch implements a new design for the symbol table that stores SymbolBodies within a memory region of the Symbol object. Symbols are mutated by constructing SymbolBodies in place over existing SymbolBodies, rather than by mutating pointers. As mentioned in the initial proposal [1], this memory layout helps reduce the cache miss rate by improving memory locality. Performance numbers: old(s) new(s) Without debug info: chrome 7.178 6.432 (-11.5%) LLVMgold.so 0.505 0.502 (-0.5%) clang 0.954 0.827 (-15.4%) llvm-as 0.052 0.045 (-15.5%) With debug info: scylla 5.695 5.613 (-1.5%) clang 14.396 14.143 (-1.8%) Performance counter results show that the fewer required indirections is indeed the cause of the improved performance. For example, when linking chrome, stalled cycles decreases from 14,556,444,002 to 12,959,238,310, and instructions per cycle increases from 0.78 to 0.83. We are also executing many fewer instructions (15,516,401,933 down to 15,002,434,310), probably because we spend less time allocating SymbolBodies. The new mechanism by which symbols are added to the symbol table is by calling add* functions on the SymbolTable. In this patch, I handle local symbols by storing them inside "unparented" SymbolBodies. This is suboptimal, but if we do want to try to avoid allocating these SymbolBodies, we can probably do that separately. I also removed a few members from the SymbolBody class that were only being used to pass information from the input file to the symbol table. This patch implements the new design for the ELF linker only. I intend to prepare a similar patch for the COFF linker. [1] http://lists.llvm.org/pipermail/llvm-dev/2016-April/098832.html Differential Revision: http://reviews.llvm.org/D19752 llvm-svn: 268178
Diffstat (limited to 'lldb/packages/Python/lldbsuite/support')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud