<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 16, 2016 at 10:35 AM, Mehdi Amini <span dir="ltr"><<a href="mailto:mehdi.amini@apple.com" target="_blank">mehdi.amini@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"><br><div><span class=""><blockquote type="cite"><div>On May 16, 2016, at 10:30 AM, Kostya Serebryany <<a href="mailto:kcc@google.com" target="_blank">kcc@google.com</a>> wrote:</div><br><div><div dir="ltr"><br><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 16, 2016 at 10:25 AM, Mehdi Amini <span dir="ltr"><<a href="mailto:mehdi.amini@apple.com" target="_blank">mehdi.amini@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><br><div><blockquote type="cite"><span><div>On May 16, 2016, at 10:22 AM, Kostya Serebryany <<a href="mailto:kcc@google.com" target="_blank">kcc@google.com</a>> wrote:</div><br></span><div><div dir="ltr">Nice! <div>What exactly did you run under than? </div></div></div></blockquote><div><br></div><div>Bootstrap clang with ThinLTO.</div><span><br><blockquote type="cite"><div><div dir="ltr"><div><div>Is this is something like "ninja check-foo" (check-thin-lto?), I'd like to add this to our sanitizer bot. </div></div></div></div></blockquote><div><br></div></span><div>I plan to add a bot that performs TSAN bootstrap with ThinLTO, probably in a month.</div></div></div></blockquote><div><br></div><div>Excellent! </div><div>Are you going to set up your own bot? </div></div></div></div></div></blockquote><div><br></div></span><div>Yes, I plan to add it to our jobs here: <a href="http://lab.llvm.org:8080/green/" target="_blank">http://lab.llvm.org:8080/green/</a></div><span class=""><div><br></div><div><br></div><blockquote type="cite"><div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>We already have an asan/msan bootstrap bot: zorg/buildbot/builders/sanitizers/buildbot_bootstrap.sh</div><div>Although adding tsan to this bot will make it too slow, we probably better have a separate one. </div></div></div></div></div></blockquote><div><br></div></span><div>I noticed that TSAN has some noticeable overhead (particularly memory overhead)</div></div></div></blockquote><div><br></div><div>For sure. TSAN's shadow is 8-to-32 and there are lots of other things it needs to track,  i.e. a 5x-10x overhead in RAM would be normal.</div><div>If you see more -- let us know. </div><div><br></div><div>--kcc </div><div><br></div><div><br></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><span class="HOEnZb"><font color="#888888"><div><br></div><div>-- </div><div>Mehdi</div></font></span><div><div class="h5"><div><br></div><br><blockquote type="cite"><div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>--kcc </div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><div><div>Right is it a bit challenging. Even though we could add a few llvm-lto tests that would run with threads, this would require an artificially large amount of input files to exhibit the races, not sure if there is a good way for that.</div></div></div></blockquote><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><div><span><font color="#888888"><div><br></div><div>-- </div><div>Mehdi</div></font></span><div><div><div><br></div><div><br></div><br><blockquote type="cite"><div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, May 14, 2016 at 10:49 PM, Mehdi Amini via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Author: mehdi_amini<br>
Date: Sun May 15 00:49:47 2016<br>
New Revision: 269588<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=269588&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=269588&view=rev</a><br>
Log:<br>
ThinLTOCodeGenerator: fix race condition found using TSAN<br>
<br>
From: Mehdi Amini <<a href="mailto:mehdi.amini@apple.com" target="_blank">mehdi.amini@apple.com</a>><br>
<br>
Modified:<br>
    llvm/trunk/lib/LTO/ThinLTOCodeGenerator.cpp<br>
<br>
Modified: llvm/trunk/lib/LTO/ThinLTOCodeGenerator.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/LTO/ThinLTOCodeGenerator.cpp?rev=269588&r1=269587&r2=269588&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/LTO/ThinLTOCodeGenerator.cpp?rev=269588&r1=269587&r2=269588&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/LTO/ThinLTOCodeGenerator.cpp (original)<br>
+++ llvm/trunk/lib/LTO/ThinLTOCodeGenerator.cpp Sun May 15 00:49:47 2016<br>
@@ -884,6 +884,11 @@ void ThinLTOCodeGenerator::run() {<br>
   auto GUIDPreservedSymbols =<br>
       computeGUIDPreservedSymbols(PreservedSymbols, TMBuilder.TheTriple);<br>
<br>
+  // Make sure that every module has an entry in the ExportLists to enable<br>
+  // threaded access to this map below<br>
+  for (auto &DefinedGVSummaries : ModuleToDefinedGVSummaries)<br>
+    ExportLists[DefinedGVSummaries.first()];<br>
+<br>
   // Parallel optimizer + codegen<br>
   {<br>
     ThreadPool Pool(ThreadCount);<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>
</div></blockquote></div></div></div><br></div></blockquote></div><br></div></div>
</div></blockquote></div></div></div><br></div></blockquote></div><br></div></div>