<div dir="ltr"><div>Some slowdown by --build-id was expected. It scans most parts of the output to compute a hash value after all. It can easily be parallelized, but it would still have non-negligible performance impact. I'd think it is not a good practice for the compiler to pass --build-id option unconditionally. It seems to me that the option was added too casually without fully understanding that the option would slows down linking time significantly.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 15, 2016 at 6:03 PM, Sean Silva <span dir="ltr"><<a href="mailto:chisophugis@gmail.com" target="_blank">chisophugis@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>Rafael took some measurements to try to investigate the effect of the local symbols changes.</div><div>I've been taking a look at the measurements he got and there were some interesting things we noticed.</div><div><br></div><div>For starters, in the range of revisions tested (r263214 through r263471), we found that the commit for --build-id was the most noticeable, with slowdowns from 7% to 23% (note: these were non-debug builds).</div><div><br></div><div>This is somewhat concerning because it appears that this option is passed to the linker by default on Linux. Any performance comparisons with other linkers before LLD started respecting --build-id must be taken with a grain of salt unless they were controlled for --build-id.</div><div><br></div><div>Returning to the original motivation for the investigation (local symbols), we see something interesting. Zooming in r263214 through r263237, we find that the performance characteristics for linking ScyllaDB are substantially different from the others. The reason for this is still unknown.</div><div><br></div><div>The following commits showed significant performance changes for ScyllaDB.</div><div><br></div><div><div>r263222 ~4% speedup for ScyllaDB</div><div>commit 1ffd121a07a3d67bf52d849c0cdef0f2fad889ba</div><div>Author: Rafael Espindola <<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></div><div>Date: Fri Mar 11 12:06:30 2016 +0000</div><div><br></div><div> Create a SymbolBody for locals.</div><div> </div><div> pr26878 shows a case where locals have to be in the got.</div><div> </div><div> git-svn-id: <a href="https://llvm.org/svn/llvm-project/lld/trunk@263222" target="_blank">https://llvm.org/svn/llvm-project/lld/trunk@263222</a> 91177308-0d34-0410-b5e6-96231b3b80d8</div><div><br></div><div>r263225 ~4% speedup for ScyllaDB</div><div>commit 34ca5194d5e5e28d760cc8a730a2e1f3b2b6a21f</div><div>Author: Rafael Espindola <<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></div><div>Date: Fri Mar 11 12:19:05 2016 +0000</div><div><br></div><div> Compute value of local symbol with getVA.</div><div> </div><div> git-svn-id: <a href="https://llvm.org/svn/llvm-project/lld/trunk@263225" target="_blank">https://llvm.org/svn/llvm-project/lld/trunk@263225</a> 91177308-0d34-0410-b5e6-96231b3b80d8</div><div><br></div><div>r263227 ~2-3% slowdown for ScyllaDB</div><div>commit 6b96b614d9e0232b106165255148af8909607ec1</div><div>Author: George Rimar <<a href="mailto:grimar@accesssoftek.com" target="_blank">grimar@accesssoftek.com</a>></div><div>Date: Fri Mar 11 12:57:52 2016 +0000</div><div><br></div><div> [ELF] - Early continue in InputSectionBase<ELFT>::relocate(). NFC.</div><div> </div><div> git-svn-id: <a href="https://llvm.org/svn/llvm-project/lld/trunk@263227" target="_blank">https://llvm.org/svn/llvm-project/lld/trunk@263227</a> 91177308-0d34-0410-b5e6-96231b3b80d8</div><div><br></div><div>r263228 ~6-7% slowdown for ScyllaDB</div><div>commit e5aedbede69d60d90f16395af8d4fa6171a5c46a</div><div>Author: Rafael Espindola <<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></div><div>Date: Fri Mar 11 13:04:28 2016 +0000</div><div><br></div><div> Simplify now that local symbols can use getVA.</div><div> </div><div> It is really odd that Mips differentiates symbols that are born local</div><div> and those that become local because of hidden visibility. I don't know</div><div> enough mips to known if this is a bug or not.</div><div> </div><div> git-svn-id: <a href="https://llvm.org/svn/llvm-project/lld/trunk@263228" target="_blank">https://llvm.org/svn/llvm-project/lld/trunk@263228</a> 91177308-0d34-0410-b5e6-96231b3b80d8</div></div><div><br></div><div><br></div><div>My full notebook is here: <a href="https://drive.google.com/file/d/0B8v10qJ6EXRxYlNTTUpiQjF5eGM/view?usp=sharing" target="_blank">https://drive.google.com/file/d/0B8v10qJ6EXRxYlNTTUpiQjF5eGM/view?usp=sharing</a></div><span class="HOEnZb"><font color="#888888"><div><br></div><div>-- Sean Silva</div><div><br></div><div><br></div><div><br></div></font></span></div>
</blockquote></div><br></div>