[PATCH] D83625: [TSan] Optimize handling of racy address

Joachim Protze via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 15 08:03:33 PDT 2020


protze.joachim added a comment.

In D83625#2152829 <https://reviews.llvm.org/D83625#2152829>, @dvyukov wrote:

> In D83625#2150120 <https://reviews.llvm.org/D83625#2150120>, @protze.joachim wrote:
>
> > I agree, that the patch changes the transitive suppression of reports. Unfortunately, this would bring back the overhead of reconstructing the remote stack trace.
> >
> > As a follow-up patch I was thinking about adding a `suppress_equal_location` flag.  
> >  I would only compare the local stack trace with previously reported stack traces in `racy_stacks`.
> >  Initially I was thinking about suppress_equal_pc, but especially for wrapper functions, the top pc is function pointer of the wrapper.
>
>
> Right, it can do more harm.


What do you think about comparing the local stack against the two hashes in racy_stacks?
I would propably have this defaulting to false unless we find it convenient for the typical usecase.

> 
> 
>> Also, I plan to add a `suppress_max_stack_depth=n` flag. The `HandleRacyStacks` function will only compare the top n frames in this case.
>>  For race in recursive algorithms, this will allow to remove duplicates with different recursion depth. (For OpenMP, this specifically helps for tasking programs)
> 
> What will be the default? What is the useful value for OpenMP programs?

My suggestion for the default is infinite / MAX_INT, i.e. not change existing behavior.

Is there a runtime interface to adjust the flags? This would allow libarcher to tweak this flag during initialization, and I could also choose different defaults for other flags.
I always suggest `ignore_noninstrumented_modules=1` for OpenMP and Fortran codes to suppress false reports from libomp and libgfortran.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D83625/new/

https://reviews.llvm.org/D83625





More information about the llvm-commits mailing list