Turn on some basic tsan annotations.
The most useful bit here is that tsan now knows the names of our threads.
Change-Id: I8eef8f31e954ffc373555b392d6d9678d76ead34
diff --git a/src/utils.cc b/src/utils.cc
index cb76636..78f524f 100644
--- a/src/utils.cc
+++ b/src/utils.cc
@@ -16,6 +16,7 @@
#include "utils.h"
+#include <dynamic_annotations.h>
#include <pthread.h>
#include <sys/stat.h>
#include <sys/syscall.h>
@@ -651,6 +652,8 @@
}
void SetThreadName(const char* threadName) {
+ ANNOTATE_THREAD_NAME(threadName); // For tsan.
+
int hasAt = 0;
int hasDot = 0;
const char* s = threadName;