[PATCH] tsan: implement suppressions for top frame only

Alexey Samsonov vonosmas at gmail.com
Wed Jun 24 11:30:06 PDT 2015


================
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/






More information about the llvm-commits mailing list