[llvm] r269588 - ThinLTOCodeGenerator: fix race condition found using TSAN
Mehdi Amini via llvm-commits
llvm-commits at lists.llvm.org
Mon May 16 10:35:54 PDT 2016
> On May 16, 2016, at 10:30 AM, Kostya Serebryany <kcc at google.com> wrote:
>
>
>
>
> On Mon, May 16, 2016 at 10:25 AM, Mehdi Amini <mehdi.amini at apple.com <mailto:mehdi.amini at apple.com>> wrote:
>
>> On May 16, 2016, at 10:22 AM, Kostya Serebryany <kcc at google.com <mailto:kcc at google.com>> wrote:
>>
>> Nice!
>> What exactly did you run under than?
>
> Bootstrap clang with ThinLTO.
>
>> Is this is something like "ninja check-foo" (check-thin-lto?), I'd like to add this to our sanitizer bot.
>
> I plan to add a bot that performs TSAN bootstrap with ThinLTO, probably in a month.
>
> Excellent!
> Are you going to set up your own bot?
Yes, I plan to add it to our jobs here: http://lab.llvm.org:8080/green/
> We already have an asan/msan bootstrap bot: zorg/buildbot/builders/sanitizers/buildbot_bootstrap.sh
> Although adding tsan to this bot will make it too slow, we probably better have a separate one.
I noticed that TSAN has some noticeable overhead (particularly memory overhead)
--
Mehdi
>
> --kcc
>
> 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.
>
>
>
>
> --
> Mehdi
>
>
>
>>
>> On Sat, May 14, 2016 at 10:49 PM, Mehdi Amini via llvm-commits <llvm-commits at lists.llvm.org <mailto:llvm-commits at lists.llvm.org>> wrote:
>> Author: mehdi_amini
>> Date: Sun May 15 00:49:47 2016
>> New Revision: 269588
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=269588&view=rev <http://llvm.org/viewvc/llvm-project?rev=269588&view=rev>
>> Log:
>> ThinLTOCodeGenerator: fix race condition found using TSAN
>>
>> From: Mehdi Amini <mehdi.amini at apple.com <mailto:mehdi.amini at apple.com>>
>>
>> Modified:
>> llvm/trunk/lib/LTO/ThinLTOCodeGenerator.cpp
>>
>> Modified: llvm/trunk/lib/LTO/ThinLTOCodeGenerator.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/LTO/ThinLTOCodeGenerator.cpp?rev=269588&r1=269587&r2=269588&view=diff <http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/LTO/ThinLTOCodeGenerator.cpp?rev=269588&r1=269587&r2=269588&view=diff>
>> ==============================================================================
>> --- llvm/trunk/lib/LTO/ThinLTOCodeGenerator.cpp (original)
>> +++ llvm/trunk/lib/LTO/ThinLTOCodeGenerator.cpp Sun May 15 00:49:47 2016
>> @@ -884,6 +884,11 @@ void ThinLTOCodeGenerator::run() {
>> auto GUIDPreservedSymbols =
>> computeGUIDPreservedSymbols(PreservedSymbols, TMBuilder.TheTriple);
>>
>> + // Make sure that every module has an entry in the ExportLists to enable
>> + // threaded access to this map below
>> + for (auto &DefinedGVSummaries : ModuleToDefinedGVSummaries)
>> + ExportLists[DefinedGVSummaries.first()];
>> +
>> // Parallel optimizer + codegen
>> {
>> ThreadPool Pool(ThreadCount);
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org <mailto:llvm-commits at lists.llvm.org>
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits <http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160516/182076d0/attachment.html>
More information about the llvm-commits
mailing list