[PATCH] D18164: [tsan] Do not instrument reads/writes to instruction profile counters.
Xinliang David Li via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 16 13:26:59 PDT 2016
On Wed, Mar 16, 2016 at 1:21 AM, Dmitry Vyukov <dvyukov at google.com> wrote:
> dvyukov added a comment.
>
> Anna reported that there is in fact some degradation if we use monotonic
> atomics. I am fine if we ignore the counters during tsan instrumentation,
Fine with that too if that is a must, but what is wrong with test
configuration modified to avoid this known limitation? According to Anna,
the following configs are tested:
- coverage + tsan
- coverage + asan
..
If the motivation is to save build time (by merging intrumentations),
How about just
- coverage + asan
- tsan
-...
This is also faster. There does not seem to be any value to repeatedly
enable coverage.
> but also file bugs on optimizer (there must be no performance difference).
DSE won't happen with monotonic used (as below) -- I am not sure if that is
a bug. The LangRef has a paragraph about Optimization guidance.
define void @foo() #0 {
store atomic i32 1, i32* @g monotonic, align 4
store atomic i32 2, i32* @g monotonic, align 4
ret void
}
thanks,
David
> This whole discussion has little to do with profiler, we are discussing
> that llvm does not permit users to have fast and correct code at the same
> time.
>
> I don't that switch to atomic RMWs under tsan is a good idea: having
> precise counters only in tsan build does not make sense. That could be a
> separate option (if user wants precise counters), but it is orthogonal to
> this discussion.
>
>
> http://reviews.llvm.org/D18164
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160316/2c57eff3/attachment.html>
More information about the llvm-commits
mailing list