<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On May 16, 2016, at 10:30 AM, Kostya Serebryany <<a href="mailto:kcc@google.com" class="">kcc@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><br class=""><div class=""><br class=""></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Mon, May 16, 2016 at 10:25 AM, Mehdi Amini <span dir="ltr" class=""><<a href="mailto:mehdi.amini@apple.com" class="">mehdi.amini@apple.com</a>></span> wrote:<br class=""><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" class=""><br class=""><div class=""><blockquote type="cite" class=""><span class="gmail-"><div class="">On May 16, 2016, at 10:22 AM, Kostya Serebryany <<a href="mailto:kcc@google.com" class="">kcc@google.com</a>> wrote:</div><br class=""></span><div class=""><div dir="ltr" class="">Nice! <div class="">What exactly did you run under than? </div></div></div></blockquote><div class=""><br class=""></div><div class="">Bootstrap clang with ThinLTO.</div><span class="gmail-"><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><div class="">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 class=""><br class=""></div></span><div class="">I plan to add a bot that performs TSAN bootstrap with ThinLTO, probably in a month.</div></div></div></blockquote><div class=""><br class=""></div><div class="">Excellent! </div><div class="">Are you going to set up your own bot? </div></div></div></div></div></blockquote><div><br class=""></div><div>Yes, I plan to add it to our jobs here: <a href="http://lab.llvm.org:8080/green/" class="">http://lab.llvm.org:8080/green/</a></div><div><br class=""></div><div><br class=""></div><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><div class="">We already have an asan/msan bootstrap bot: zorg/buildbot/builders/sanitizers/buildbot_bootstrap.sh</div><div class="">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 class=""></div><div>I noticed that TSAN has some noticeable overhead (particularly memory overhead)</div><div><br class=""></div><div>-- </div><div>Mehdi</div><div><br class=""></div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><div class=""><br class=""></div><div class="">--kcc </div><div class=""> </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" class=""><div class=""><div class="">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 class=""><br class=""></div><div class=""><br class=""></div><div class=""> </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" class=""><div class=""><span class="gmail-HOEnZb"><font color="#888888" class=""><div class=""><br class=""></div><div class="">-- </div><div class="">Mehdi</div></font></span><div class=""><div class="gmail-h5"><div class=""><br class=""></div><div class=""><br class=""></div><br class=""><blockquote type="cite" class=""><div class=""><div class="gmail_extra"><br class=""><div class="gmail_quote">On Sat, May 14, 2016 at 10:49 PM, Mehdi Amini via llvm-commits <span dir="ltr" class=""><<a href="mailto:llvm-commits@lists.llvm.org" class="">llvm-commits@lists.llvm.org</a>></span> wrote:<br class=""><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 class="">
Date: Sun May 15 00:49:47 2016<br class="">
New Revision: 269588<br class="">
<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=269588&view=rev" rel="noreferrer" class="">http://llvm.org/viewvc/llvm-project?rev=269588&view=rev</a><br class="">
Log:<br class="">
ThinLTOCodeGenerator: fix race condition found using TSAN<br class="">
<br class="">
From: Mehdi Amini <<a href="mailto:mehdi.amini@apple.com" class="">mehdi.amini@apple.com</a>><br class="">
<br class="">
Modified:<br class="">
    llvm/trunk/lib/LTO/ThinLTOCodeGenerator.cpp<br class="">
<br class="">
Modified: llvm/trunk/lib/LTO/ThinLTOCodeGenerator.cpp<br class="">
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" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/LTO/ThinLTOCodeGenerator.cpp?rev=269588&r1=269587&r2=269588&view=diff</a><br class="">
==============================================================================<br class="">
--- llvm/trunk/lib/LTO/ThinLTOCodeGenerator.cpp (original)<br class="">
+++ llvm/trunk/lib/LTO/ThinLTOCodeGenerator.cpp Sun May 15 00:49:47 2016<br class="">
@@ -884,6 +884,11 @@ void ThinLTOCodeGenerator::run() {<br class="">
   auto GUIDPreservedSymbols =<br class="">
       computeGUIDPreservedSymbols(PreservedSymbols, TMBuilder.TheTriple);<br class="">
<br class="">
+  // Make sure that every module has an entry in the ExportLists to enable<br class="">
+  // threaded access to this map below<br class="">
+  for (auto &DefinedGVSummaries : ModuleToDefinedGVSummaries)<br class="">
+    ExportLists[DefinedGVSummaries.first()];<br class="">
+<br class="">
   // Parallel optimizer + codegen<br class="">
   {<br class="">
     ThreadPool Pool(ThreadCount);<br class="">
<br class="">
<br class="">
_______________________________________________<br class="">
llvm-commits mailing list<br class="">
<a href="mailto:llvm-commits@lists.llvm.org" class="">llvm-commits@lists.llvm.org</a><br class="">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br class="">
</blockquote></div><br class=""></div>
</div></blockquote></div></div></div><br class=""></div></blockquote></div><br class=""></div></div>
</div></blockquote></div><br class=""></body></html>