[PATCH] D18164: [tsan] Do not instrument reads/writes to instruction profile counters.

Xinliang David Li via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 15 11:19:50 PDT 2016


On Tue, Mar 15, 2016 at 10:44 AM, Dmitry Vyukov <dvyukov at google.com> wrote:

> dvyukov added a comment.
>
> > What is the right way to teach tsan to be quiet about benign races?
>
>
> There is no such thing as benign data races in llvm, so there is nothing
> to teach tsan about.
> http://llvm.org/docs/Atomics.html#optimization-outside-atomic
>
> > No -- tsan warning should not be the right motivation for this kind of
> change.
>
>
> You seem to assume that marking the profiler memory accesses as
> monotonically atomic will degrade performance. Why? If that's the case then
> there is a bug in llvm optimizer, and we need to fix it.
>

It might -- at least we should measure it. Note that instrumentation run is
already pretty slow, so we need to be careful not to regress it.

David


> There is no difference between the compiler-emitted instrumentation and
> similar hand-written instrumentation. And we definitely don't want users to
> write racy code. But we don't want users to be penalized for writing
> correct code as well.
>
>
> http://reviews.llvm.org/D18164
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160315/a7c472cd/attachment.html>


More information about the llvm-commits mailing list