tsan: fix build

llvm-svn: 229120
This commit is contained in:
Dmitry Vyukov 2015-02-13 16:08:43 +00:00
parent 9a7971131e
commit b57e39e310
2 changed files with 2 additions and 9 deletions

View File

@ -550,14 +550,12 @@ void StatOutput(u64 *stat);
void ALWAYS_INLINE StatInc(ThreadState *thr, StatType typ, u64 n = 1) {
#ifdef TSAN_COLLECT_STATS
if (kCollectStats)
thr->stat[typ] += n;
thr->stat[typ] += n;
#endif
}
void ALWAYS_INLINE StatSet(ThreadState *thr, StatType typ, u64 n) {
#ifdef TSAN_COLLECT_STATS
if (kCollectStats)
thr->stat[typ] = n;
thr->stat[typ] = n;
#endif
}

View File

@ -18,16 +18,11 @@ namespace __tsan {
#ifdef TSAN_COLLECT_STATS
void StatAggregate(u64 *dst, u64 *src) {
if (!kCollectStats)
return;
for (int i = 0; i < StatCnt; i++)
dst[i] += src[i];
}
void StatOutput(u64 *stat) {
if (!kCollectStats)
return;
stat[StatShadowNonZero] = stat[StatShadowProcessed] - stat[StatShadowZero];
static const char *name[StatCnt] = {};