[compiler-rt] 52a4a4a - tsan: remove unused ReportMutex::destroyed
Dmitry Vyukov via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 21 02:37:06 PST 2021
Author: Dmitry Vyukov
Date: 2021-12-21T11:37:01+01:00
New Revision: 52a4a4a53c3ebffe474802dc87cd61a38e1783b5
URL: https://github.com/llvm/llvm-project/commit/52a4a4a53c3ebffe474802dc87cd61a38e1783b5
DIFF: https://github.com/llvm/llvm-project/commit/52a4a4a53c3ebffe474802dc87cd61a38e1783b5.diff
LOG: tsan: remove unused ReportMutex::destroyed
Depends on D113980.
Reviewed By: melver
Differential Revision: https://reviews.llvm.org/D113981
Added:
Modified:
compiler-rt/lib/tsan/rtl/tsan_debugging.cpp
compiler-rt/lib/tsan/rtl/tsan_report.cpp
compiler-rt/lib/tsan/rtl/tsan_report.h
compiler-rt/lib/tsan/rtl/tsan_rtl_report.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/tsan/rtl/tsan_debugging.cpp b/compiler-rt/lib/tsan/rtl/tsan_debugging.cpp
index 1d3c3849a446..1e61c31c5a97 100644
--- a/compiler-rt/lib/tsan/rtl/tsan_debugging.cpp
+++ b/compiler-rt/lib/tsan/rtl/tsan_debugging.cpp
@@ -157,7 +157,7 @@ int __tsan_get_report_mutex(void *report, uptr idx, uptr *mutex_id, void **addr,
ReportMutex *mutex = rep->mutexes[idx];
*mutex_id = mutex->id;
*addr = (void *)mutex->addr;
- *destroyed = mutex->destroyed;
+ *destroyed = false;
if (mutex->stack) CopyTrace(mutex->stack->frames, trace, trace_size);
return 1;
}
diff --git a/compiler-rt/lib/tsan/rtl/tsan_report.cpp b/compiler-rt/lib/tsan/rtl/tsan_report.cpp
index 001ba30b20ac..10d9c761b8ee 100644
--- a/compiler-rt/lib/tsan/rtl/tsan_report.cpp
+++ b/compiler-rt/lib/tsan/rtl/tsan_report.cpp
@@ -223,17 +223,11 @@ static void PrintMutexShortWithAddress(const ReportMutex *rm,
static void PrintMutex(const ReportMutex *rm) {
Decorator d;
- if (rm->destroyed) {
- Printf("%s", d.Mutex());
- Printf(" Mutex M%u is already destroyed.\n\n", rm->id);
- Printf("%s", d.Default());
- } else {
- Printf("%s", d.Mutex());
- Printf(" Mutex M%u (%p) created at:\n", rm->id,
- reinterpret_cast<void *>(rm->addr));
- Printf("%s", d.Default());
- PrintStack(rm->stack);
- }
+ Printf("%s", d.Mutex());
+ Printf(" Mutex M%u (%p) created at:\n", rm->id,
+ reinterpret_cast<void *>(rm->addr));
+ Printf("%s", d.Default());
+ PrintStack(rm->stack);
}
static void PrintThread(const ReportThread *rt) {
diff --git a/compiler-rt/lib/tsan/rtl/tsan_report.h b/compiler-rt/lib/tsan/rtl/tsan_report.h
index da4f148d89ef..3b367f38e266 100644
--- a/compiler-rt/lib/tsan/rtl/tsan_report.h
+++ b/compiler-rt/lib/tsan/rtl/tsan_report.h
@@ -93,7 +93,6 @@ struct ReportThread {
struct ReportMutex {
int id;
uptr addr;
- bool destroyed;
ReportStack *stack;
};
diff --git a/compiler-rt/lib/tsan/rtl/tsan_rtl_report.cpp b/compiler-rt/lib/tsan/rtl/tsan_rtl_report.cpp
index 1fd16d09c553..58949ead07b3 100644
--- a/compiler-rt/lib/tsan/rtl/tsan_rtl_report.cpp
+++ b/compiler-rt/lib/tsan/rtl/tsan_rtl_report.cpp
@@ -270,7 +270,6 @@ int ScopedReportBase::AddMutex(uptr addr, StackID creation_stack_id) {
rep_->mutexes.PushBack(rm);
rm->id = rep_->mutexes.Size() - 1;
rm->addr = addr;
- rm->destroyed = false;
rm->stack = SymbolizeStackId(creation_stack_id);
return rm->id;
}
More information about the llvm-commits
mailing list