<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none"><!-- p { margin-top: 0px; margin-bottom: 0px; }--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Slowdown by "<span style="color: rgb(33, 33, 33); font-family: 'Segoe UI', 'Segoe WP', 'Segoe UI WPC', Tahoma, Arial, sans-serif; font-size: 15px; background-color: rgb(255, 255, 255);">[ELF] - Early continue in InputSectionBase<ELFT>::relocate(). NFC.</span>​"
 looks wierd for me. I do not see any reasons for any impact on perfomance by this change.<br>
</p>
<p>Good news is that since it was NFC it can easily be reverted. But I think slowdown in results is unrelative with that change and reverting will not give us 2-3% boost back.<br>
</p>
<p><br>
</p>
<div id="Signature">
<div class="BodyFragment"><font size="2">
<div class="PlainText">Best regards,<br>
George.</div>
</font></div>
</div>
<div style="color: rgb(33, 33, 33);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>От:</b> Rui Ueyama <ruiu@google.com><br>
<b>Отправлено:</b> 16 марта 2016 г. 4:24<br>
<b>Кому:</b> Sean Silva<br>
<b>Копия:</b> llvm-dev; Rafael Ávila de Espíndola; Michael Spencer; Davide Italiano; George Rimar<br>
<b>Тема:</b> Re: LLD performance w.r.t. local symbols (and --build-id)</font>
<div> </div>
</div>
<div>
<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>
</div>
</div>
</body>
</html>