diff options
author | Dmitry Vyukov <dvyukov@google.com> | 2012-10-05 15:51:32 +0000 |
---|---|---|
committer | Dmitry Vyukov <dvyukov@google.com> | 2012-10-05 15:51:32 +0000 |
commit | 158c6ac3bb46753db217f9c2c73485811a3a1890 (patch) | |
tree | 35446f9b52b732f98d7e6e0f1288ddf083778ddc /lib/tsan/rtl/tsan_suppressions.cc | |
parent | 50f2e30497ba2a69ee5721e7235a296d7c13a495 (diff) | |
download | compiler-rt-158c6ac3bb46753db217f9c2c73485811a3a1890.tar.gz compiler-rt-158c6ac3bb46753db217f9c2c73485811a3a1890.tar.bz2 compiler-rt-158c6ac3bb46753db217f9c2c73485811a3a1890.tar.xz |
tsan: cache pc's that cause suppressions (this way we do not need to symbolize the reports)
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@165317 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/tsan/rtl/tsan_suppressions.cc')
-rw-r--r-- | lib/tsan/rtl/tsan_suppressions.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/tsan/rtl/tsan_suppressions.cc b/lib/tsan/rtl/tsan_suppressions.cc index ef7b691b..acb95e5d 100644 --- a/lib/tsan/rtl/tsan_suppressions.cc +++ b/lib/tsan/rtl/tsan_suppressions.cc @@ -134,9 +134,9 @@ void InitializeSuppressions() { g_suppressions = SuppressionParse(supp); } -bool IsSuppressed(ReportType typ, const ReportStack *stack) { +uptr IsSuppressed(ReportType typ, const ReportStack *stack) { if (g_suppressions == 0 || stack == 0) - return false; + return 0; SuppressionType stype; if (typ == ReportTypeRace) stype = SuppressionRace; @@ -147,17 +147,17 @@ bool IsSuppressed(ReportType typ, const ReportStack *stack) { else if (typ == ReportTypeSignalUnsafe) stype = SuppressionSignal; else - return false; + return 0; for (const ReportStack *frame = stack; frame; frame = frame->next) { for (Suppression *supp = g_suppressions; supp; supp = supp->next) { if (stype == supp->type && (SuppressionMatch(supp->templ, frame->func) || SuppressionMatch(supp->templ, frame->file))) { DPrintf("ThreadSanitizer: matched suppression '%s'\n", supp->templ); - return true; + return frame->pc; } } } - return false; + return 0; } } // namespace __tsan |