<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 26, 2015 at 11:46 AM, Chris Matthews <span dir="ltr"><<a href="mailto:chris.matthews@apple.com" target="_blank">chris.matthews@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">I’d love to experiment with this approach, and any tool I don’t have to write my self is a bonus!</div></blockquote><div><br></div><div>For starters, you can just use a SHA1 sum which is what I have been doing and which appears to reduce the search space by a factor of about 1000. I'm not sure we need anything more sophisticated than that.</div><div><br></div><div>Also, the hash is amenable to being stored in a database which avoids the need to do numerous pairwise comparisons of actual binaries.</div><div><br></div><div>Maybe we can fall back to a more detailed pairwise comparison if the hashes differ, but I'm not sure how much more that will buy us (a spot-check of the commits that I detected as changing the binary suggests that they did actually change it in a substantial way).</div><div><br></div><div>-- Sean Silva</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><br></div><div>OSX support too?</div><div><div class="h5"><div><br><div><blockquote type="cite"><div>On May 26, 2015, at 9:53 AM, Smith, Kevin B <<a href="mailto:kevin.b.smith@intel.com" target="_blank">kevin.b.smith@intel.com</a>> wrote:</div><br><div>
<div lang="EN-US" link="blue" vlink="purple">
<div><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1f497d">Intel has a binary comparator tool that we have been using for several years for comparing output binaries<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1f497d">to see if the code within them is considered identical. We use it to eliminate runs (and therefore some performance noise)<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1f497d">from our own performance tracking tools.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1f497d">We are willing to contribute the source code for this to the LLVM community if there is interest.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1f497d">There are two programs involved: getdep, which displays the list of DLL/.so dependencies of the image in question, and cmpimage itself, which does the comparison
ignoring the parts not contributed by the compiler. The cmpimage program is also almost completely derived from the published object format descriptions.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1f497d">Let me know if there is interest in these pieces of tooling, and if so, what you think next steps should be.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1f497d">Kevin B. Smith<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> <a href="mailto:llvmdev-bounces@cs.uiuc.edu" target="_blank">llvmdev-bounces@cs.uiuc.edu</a> [<a href="mailto:llvmdev-bounces@cs.uiuc.edu" target="_blank">mailto:llvmdev-bounces@cs.uiuc.edu</a>]
<b>On Behalf Of </b>Sean Silva<br>
<b>Sent:</b> Thursday, May 21, 2015 2:14 PM<br>
<b>To:</b> Chris Matthews<br>
<b>Cc:</b> LLVM Developers Mailing List<br>
<b>Subject:</b> Re: [LLVMdev] Proposal: change LNT’s regression detection algorithm and how it is used to reduce false positives<u></u><u></u></span></p><p class="MsoNormal"><u></u> <u></u></p>
<div><p class="MsoNormal"><u></u> <u></u></p>
<div><p class="MsoNormal"><u></u> <u></u></p>
<div><p class="MsoNormal">On Thu, May 21, 2015 at 11:24 AM, Chris Matthews <<a href="mailto:chris.matthews@apple.com" target="_blank">chris.matthews@apple.com</a>> wrote:<u></u><u></u></p><p class="MsoNormal">I agree this is a great idea. I think it needs to be fleshed out a little though.<br>
<br>
It would still be wise to run the regression detection algorithm, because the test suite changes and the machines change, and the algorithm is not perfect yet. It would be a valuable source of information though.<u></u><u></u></p>
<div><p class="MsoNormal"><u></u> <u></u></p>
</div>
<div><p class="MsoNormal">How would running it as part of regular testing change anything? Presumably the only purpose it would serve is retrospectively going back and seeing false-positives in the aggregate. But if we are already doing offline analysis, we can
run the regression detection algorithm (or any prospective ones) offline on the raw data; it doesn't take that long.<u></u><u></u></p>
</div>
<div><p class="MsoNormal"> <u></u><u></u></p>
</div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in"><p class="MsoNormal"><br>
This is not a small change to how LNT works, so I think some due diligence is necessary. Is clang *really* that deterministic, especially over successive revs? <u></u><u></u></p>
</blockquote>
<div><p class="MsoNormal"><u></u> <u></u></p>
</div>
<div><p class="MsoNormal">Yes. Actually, google's build system depends on this for its caching strategy to work and so the google guys are usually on top of any issues in this respect (thanks google guys!).<u></u><u></u></p>
</div>
<div><p class="MsoNormal"><u></u> <u></u></p>
</div>
<div><p class="MsoNormal"> <u></u><u></u></p>
</div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in"><p class="MsoNormal">I know it is supposed to be. Does anyone have any data to show this is going to be an effective approach? It seems like there are benchmarks in the test-suite which use __DATE__ and __TIME__ in them. I assume that will be a problem?<u></u><u></u></p>
</blockquote>
<div><p class="MsoNormal"><u></u> <u></u></p>
</div>
<div><p class="MsoNormal">__DATE__ and __TIME__ should be easy to solve by modifying the benchmark, or teaching clang to always return a fixed value for them (maybe we already have this? IIRC google's build system does something like this; or maybe the do it at
the OS level).<u></u><u></u></p>
</div>
<div><p class="MsoNormal"><u></u> <u></u></p>
</div>
<div><p class="MsoNormal">-- Sean Silva<u></u><u></u></p>
</div>
<div><p class="MsoNormal"> <u></u><u></u></p>
</div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div><p class="MsoNormal"><br>
> On May 21, 2015, at 1:43 AM, Renato Golin <<a href="mailto:renato.golin@linaro.org" target="_blank">renato.golin@linaro.org</a>> wrote:<br>
><br>
> On 20 May 2015 at 23:31, Sean Silva <<a href="mailto:chisophugis@gmail.com" target="_blank">chisophugis@gmail.com</a>> wrote:<br>
>> In the last 10,000 revisions of LLVM+Clang, only 10 revisions actually<br>
>> caused the binary of MultiSource/Benchmarks/BitBench/five11 to change. So if<br>
>> just store a hash of the binary in the database, we should be able to pool<br>
>> all samples we have collected while the binary is the the same as it<br>
>> currently is, which will let us use significantly more datapoints for the<br>
>> reference.<br>
><br>
> +1<br>
><br>
><br>
>> Also, we can trivially eliminate running the regression detection algorithm<br>
>> if the binary hasn't changed.<br>
><br>
> +2!<br>
><br>
> --renato<u></u><u></u></p>
</div>
</div>
<div>
<div><p class="MsoNormal" style="margin-bottom:12.0pt">> _______________________________________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu/" target="_blank">http://llvm.cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><u></u><u></u></p>
</div>
</div>
</blockquote>
</div><p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</div>
</div>
_______________________________________________<br>LLVM Developers mailing list<br><a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br></div></blockquote></div><br></div></div></div></div></blockquote></div><br></div></div>