tsan: minor optimizations for Go runtime

llvm-svn: 210351
This commit is contained in:
Dmitry Vyukov 2014-06-06 16:06:19 +00:00
parent 07f7991f30
commit 9546afec62
1 changed files with 2 additions and 1 deletions

View File

@ -706,7 +706,7 @@ void MemoryAccess(ThreadState *thr, uptr pc, uptr addr,
}
#endif
if (*shadow_mem == kShadowRodata) {
if (kCppMode && *shadow_mem == kShadowRodata) {
// Access to .rodata section, no races here.
// Measurements show that it can be 10-20% of all memory accesses.
StatInc(thr, StatMop);
@ -751,6 +751,7 @@ void MemoryAccess(ThreadState *thr, uptr pc, uptr addr,
}
// Called by MemoryAccessRange in tsan_rtl_thread.cc
ALWAYS_INLINE USED
void MemoryAccessImpl(ThreadState *thr, uptr addr,
int kAccessSizeLog, bool kAccessIsWrite, bool kIsAtomic,
u64 *shadow_mem, Shadow cur) {