<div dir="ltr">While people are putting feature bugs in your ear, one thing I have wanted LNT to do for a long time is to track the hash of the generated binary. Since the compiler is usually deterministic, the binary hashes change much less frequently than the compiler changes, and having access to that information makes some additional things possible (like easily detecting when something is just noise).<div><br></div><div>The other advantage of tracking this is that, in theory, another server could be responsible for archiving all of the generated de-duplicated binaries. The de-dupped content shouldn't actually be that large, and this would be an easy thing to host on some cloud based provider that can accommodate the storage requirements. That server could then be responsible for having features like providing on-demand disassembly of a given executable.</div><div><br></div><div> - Daniel</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 25, 2015 at 8:12 AM, Kristof Beyls <span dir="ltr"><<a href="mailto:kristof.beyls@arm.com" target="_blank">kristof.beyls@arm.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-GB" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Yes, absolutely!<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Right now, we’re slowly getting to the point where we’re seeing the significant performance changes on <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_perf&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=GhXGfqpJ2jLyQfk-oSN1eyRn60xOYcZ5BccK6CxPtqk&s=FM07v0Fr9jbooSOHCJcNpsxpU5p17PKiHOsygJaS9Bs&e=" target="_blank">http://llvm.org/perf</a>.<br>I’m currently focussing mainly on improving the daily report page (<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_perf_db-5Fdefault_v4_nts_daily-5Freport&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=GhXGfqpJ2jLyQfk-oSN1eyRn60xOYcZ5BccK6CxPtqk&s=Z6dZE1TWytlQ9bnrW1pM-X64LzZ0ybUmjrcIWPFLLxk&e=" target="_blank">http://llvm.org/perf/db_default/v4/nts/daily_report</a>) as that<br>seems the most useful report to get an overview of the significant changes.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">But once that is working well, the next step is to make it easy to understand what caused the significant performance change.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Indeed, something visual that helps to intuitively understand the main changes in the profile + a way to also see the corresponding<br>changes in assembly code.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Measuring the profile + recording the assembly code for all programs at every run will likely be prohibitively expensive – both<br>due to the performance tracking bots slowing down and the storage capacity needed to store the information for all runs on the server.<br>But maybe the rerun-functionality could be extended so that for the significant changes, the bot is asked to do extra profiling runs<br>of the programs with significant performance deltas and is asked to also submit the assembly produced. That will need to be done<br>for both the current version of clang under test + the previous version. How to make sure the bot caches a number of previous versions<br>(or rebuilds it) is probably not entirely trivial. We’ll also need to make sure that the profiles and the assembly code also don’t<br>massively increase the storage needs on the server side. But all-in-all, off the top of my head, this seems to be the most straightforward<br>way to get to a system like you describe below.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">So, yes, absolutely, being able to detect significant performance deltas is not the end goal, but rather a system like you describe below.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Kristof<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt"><div><div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm"><p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Sean Silva [mailto:<a href="mailto:chisophugis@gmail.com" target="_blank">chisophugis@gmail.com</a>] <br><b>Sent:</b> 25 June 2015 03:23<br><b>To:</b> Kristof Beyls<br><b>Cc:</b> llvm-commits; Tobias Grosser<span class=""><br><b>Subject:</b> Re: [PATCH][LNT] Add support for more detailed profiling to lnt.<u></u><u></u></span></span></p></div></div><p class="MsoNormal"><u></u> <u></u></p><div><p class="MsoNormal">It would be awesome if when we detect a performance change of one of the benchmarks (not the LNT server), we did a similar analysis across the two versions and presented a graph like this, but where the weight is the performance diff of the function. Bonus points for making the graph nodes clickable and showing an annotated assembly diff.<u></u><u></u></p><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">-- Sean Silva<u></u><u></u></p></div></div><div><div class="h5"><div><p class="MsoNormal"><u></u> <u></u></p><div><p class="MsoNormal">On Wed, Jun 24, 2015 at 10:15 AM, Kristof Beyls <<a href="mailto:kristof.beyls@arm.com" target="_blank">kristof.beyls@arm.com</a>> wrote:<u></u><u></u></p><div><div><p class="MsoNormal">Hi,<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">The attached patch adds support for getting call-graph profiles from lnt runserver. It does this by adding<br>a new –profiler-dir command line option, which results in a pstat profile to be stored to a separate file<br>in that sub directory, per web request. I find the extra call graph info very<br>useful when trying to understand what the bottlenecks are in the rendering of pages by the<br>lnt webserver.<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">The pstat files can easily be converted into something graphical by a command like:<u></u><u></u></p><p class="MsoNormal">$ gprof2dot -f pstats profile_dir/POST.submitRun.000591ms.1435075964.prof |  dot -Tsvg > submitRun.svg<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">I’ve attached such an svg graph for a request of the daily report page to give an idea of<br>the kind of information this more detailed profiling can give.<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">Does the patch look OK to commit?<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">Thanks,<u></u><u></u></p><p class="MsoNormal"><span style="color:#888888"> <u></u><u></u></span></p><p class="MsoNormal"><span style="color:#888888">Kristof<u></u><u></u></span></p></div></div><p class="MsoNormal" style="margin-bottom:12.0pt"><br>_______________________________________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><u></u><u></u></p></div><p class="MsoNormal"><u></u> <u></u></p></div></div></div></div></div></div></blockquote></div><br></div>