[PATCH] tsan: implement suppressions for top frame only

Alexander Potapenko glider at google.com
Wed Jun 24 14:25:53 PDT 2015


Alexey, wdyt about this functionality in general? Shall we limit it to TSan?

sent from phone
On Jun 24, 2015 8:30 PM, "Alexey Samsonov" <vonosmas at gmail.com> wrote:

> ================
> Comment at: lib/tsan/rtl/tsan_suppressions.cc:110
> @@ -108,3 +109,3 @@
>      const AddressInfo &info = frame->info;
>      if (suppression_ctx->Match(info.function, stype, &s) ||
>          suppression_ctx->Match(info.file, stype, &s) ||
> ----------------
> you can totally factor this out to
>   bool IsSuppressed(const AddressInfo &info, const char *suppression_type,
> Suppression **sp);
>
> ================
> Comment at: lib/tsan/rtl/tsan_suppressions.cc:119
> @@ -117,1 +118,3 @@
>    }
> +  if (0 == internal_strcmp(stype, kSuppressionRace) && stack->frames !=
> 0) {
> +    const AddressInfo &info = stack->frames->info;
> ----------------
>   stack->frames != nullptr
>
> ================
> Comment at: test/tsan/race_top_suppression.cc.supp:1
> @@ +1,1 @@
> +race_top:TopFunction
> ----------------
> I'd prefer to get rid of extra file, and create it with "echo" command in
> the RUN-line.
>
> ================
> Comment at: test/tsan/race_top_suppression1.cc.supp:1
> @@ +1,1 @@
> +race_top:TopFunction
> ----------------
> Ditto
>
> http://reviews.llvm.org/D10686
>
> EMAIL PREFERENCES
>   http://reviews.llvm.org/settings/panel/emailpreferences/
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150625/2c30dd3d/attachment.html>


More information about the llvm-commits mailing list