diff options
author | kcc <kcc@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-12-05 13:19:55 +0000 |
---|---|---|
committer | kcc <kcc@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-12-05 13:19:55 +0000 |
commit | 4ab070fc750612ffbe12b7a67de3fa3e8d9d81ea (patch) | |
tree | 1a9c1fa8fc461362f209a6c9b1abdadaacf74938 /libsanitizer/tsan/tsan_rtl_mutex.cc | |
parent | 14799b23a661479a4f3d2ec15471afb3618af00d (diff) | |
download | gcc-4ab070fc750612ffbe12b7a67de3fa3e8d9d81ea.tar.gz |
[libsanitizer] merge from upstream r169371
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194221 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libsanitizer/tsan/tsan_rtl_mutex.cc')
-rw-r--r-- | libsanitizer/tsan/tsan_rtl_mutex.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libsanitizer/tsan/tsan_rtl_mutex.cc b/libsanitizer/tsan/tsan_rtl_mutex.cc index 9ace430bc58..e5b43be6a49 100644 --- a/libsanitizer/tsan/tsan_rtl_mutex.cc +++ b/libsanitizer/tsan/tsan_rtl_mutex.cc @@ -73,7 +73,7 @@ void MutexLock(ThreadState *thr, uptr pc, uptr addr) { if (IsAppMem(addr)) MemoryRead1Byte(thr, pc, addr); thr->fast_state.IncrementEpoch(); - TraceAddEvent(thr, thr->fast_state.epoch(), EventTypeLock, addr); + TraceAddEvent(thr, thr->fast_state, EventTypeLock, addr); SyncVar *s = CTX()->synctab.GetAndLock(thr, pc, addr, true); if (s->owner_tid == SyncVar::kInvalidTid) { CHECK_EQ(s->recursion, 0); @@ -105,7 +105,7 @@ void MutexUnlock(ThreadState *thr, uptr pc, uptr addr) { if (IsAppMem(addr)) MemoryRead1Byte(thr, pc, addr); thr->fast_state.IncrementEpoch(); - TraceAddEvent(thr, thr->fast_state.epoch(), EventTypeUnlock, addr); + TraceAddEvent(thr, thr->fast_state, EventTypeUnlock, addr); SyncVar *s = CTX()->synctab.GetAndLock(thr, pc, addr, true); if (s->recursion == 0) { if (!s->is_broken) { @@ -142,7 +142,7 @@ void MutexReadLock(ThreadState *thr, uptr pc, uptr addr) { if (IsAppMem(addr)) MemoryRead1Byte(thr, pc, addr); thr->fast_state.IncrementEpoch(); - TraceAddEvent(thr, thr->fast_state.epoch(), EventTypeRLock, addr); + TraceAddEvent(thr, thr->fast_state, EventTypeRLock, addr); SyncVar *s = CTX()->synctab.GetAndLock(thr, pc, addr, false); if (s->owner_tid != SyncVar::kInvalidTid) { Printf("ThreadSanitizer WARNING: read lock of a write locked mutex\n"); @@ -162,7 +162,7 @@ void MutexReadUnlock(ThreadState *thr, uptr pc, uptr addr) { if (IsAppMem(addr)) MemoryRead1Byte(thr, pc, addr); thr->fast_state.IncrementEpoch(); - TraceAddEvent(thr, thr->fast_state.epoch(), EventTypeRUnlock, addr); + TraceAddEvent(thr, thr->fast_state, EventTypeRUnlock, addr); SyncVar *s = CTX()->synctab.GetAndLock(thr, pc, addr, true); if (s->owner_tid != SyncVar::kInvalidTid) { Printf("ThreadSanitizer WARNING: read unlock of a write " @@ -186,7 +186,7 @@ void MutexReadOrWriteUnlock(ThreadState *thr, uptr pc, uptr addr) { // Seems to be read unlock. StatInc(thr, StatMutexReadUnlock); thr->fast_state.IncrementEpoch(); - TraceAddEvent(thr, thr->fast_state.epoch(), EventTypeRUnlock, addr); + TraceAddEvent(thr, thr->fast_state, EventTypeRUnlock, addr); thr->clock.set(thr->tid, thr->fast_state.epoch()); thr->fast_synch_epoch = thr->fast_state.epoch(); thr->clock.release(&s->read_clock); @@ -203,7 +203,7 @@ void MutexReadOrWriteUnlock(ThreadState *thr, uptr pc, uptr addr) { // First, it's a bug to increment the epoch w/o writing to the trace. // Then, the acquire/release logic can be factored out as well. thr->fast_state.IncrementEpoch(); - TraceAddEvent(thr, thr->fast_state.epoch(), EventTypeUnlock, addr); + TraceAddEvent(thr, thr->fast_state, EventTypeUnlock, addr); thr->clock.set(thr->tid, thr->fast_state.epoch()); thr->fast_synch_epoch = thr->fast_state.epoch(); thr->clock.ReleaseStore(&s->clock); |