projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0b00a7f
)
tsan: add a hook to obtain number of reports
author
Dmitry Vyukov
<dvyukov@google.com>
Fri, 28 Oct 2016 21:25:37 +0000
(21:25 +0000)
committer
Dmitry Vyukov
<dvyukov@google.com>
Fri, 28 Oct 2016 21:25:37 +0000
(21:25 +0000)
Requested in:
https://github.com/golang/go/issues/15972
Will help to fail individual test cases with races.
llvm-svn: 285455
compiler-rt/lib/tsan/go/tsan_go.cc
patch
|
blob
|
history
diff --git
a/compiler-rt/lib/tsan/go/tsan_go.cc
b/compiler-rt/lib/tsan/go/tsan_go.cc
index
bc0d553
..
34625c8
100644
(file)
--- a/
compiler-rt/lib/tsan/go/tsan_go.cc
+++ b/
compiler-rt/lib/tsan/go/tsan_go.cc
@@
-271,6
+271,11
@@
void __tsan_go_ignore_sync_end(ThreadState *thr) {
ThreadIgnoreSyncEnd(thr, 0);
}
+void __tsan_report_count(u64 *pn) {
+ Lock lock(&ctx->report_mtx);
+ *pn = ctx->nreported;
+}
+
} // extern "C"
} // namespace __tsan