summaryrefslogtreecommitdiff
path: root/lib/tsan/rtl/tsan_platform.h
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2014-07-15 09:31:29 +0000
committerDmitry Vyukov <dvyukov@google.com>2014-07-15 09:31:29 +0000
commit90427f2d2258a9eca703bd0d5c87813a4a43d2a5 (patch)
treea77d3d6379fedc3b0721ad58fe5c11332f367350 /lib/tsan/rtl/tsan_platform.h
parent727c7eee0581e70f1245002ea199f773b1e4dede (diff)
tsan: remove compat mapping
There are no known usages anymore, so one less thing to support. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@213056 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/tsan/rtl/tsan_platform.h')
-rw-r--r--lib/tsan/rtl/tsan_platform.h40
1 files changed, 1 insertions, 39 deletions
diff --git a/lib/tsan/rtl/tsan_platform.h b/lib/tsan/rtl/tsan_platform.h
index 7d8d9770e..b1632640a 100644
--- a/lib/tsan/rtl/tsan_platform.h
+++ b/lib/tsan/rtl/tsan_platform.h
@@ -24,20 +24,6 @@ C++ linux memory layout:
7d00 0000 0000 - 7e00 0000 0000: heap
7e00 0000 0000 - 7fff ffff ffff: modules and main thread stack
-C++ COMPAT linux memory layout:
-0000 0000 0000 - 0400 0000 0000: protected
-0400 0000 0000 - 1000 0000 0000: shadow
-1000 0000 0000 - 2900 0000 0000: protected
-2900 0000 0000 - 2c00 0000 0000: modules
-2c00 0000 0000 - 3000 0000 0000: -
-3000 0000 0000 - 4000 0000 0000: metainfo (memory blocks and sync objects)
-4000 0000 0000 - 6000 0000 0000: -
-6000 0000 0000 - 6200 0000 0000: traces
-6200 0000 0000 - 7d00 0000 0000: -
-7d00 0000 0000 - 7e00 0000 0000: heap
-7e00 0000 0000 - 7f00 0000 0000: -
-7f00 0000 0000 - 7fff ffff ffff: main thread stack
-
Go linux and darwin memory layout:
0000 0000 0000 - 0000 1000 0000: executable
0000 1000 0000 - 00f8 0000 0000: -
@@ -85,18 +71,8 @@ static const uptr kMetaSize = 0x100000000000ULL;
#else // defined(TSAN_GO)
static const uptr kMetaShadow = 0x300000000000ULL;
static const uptr kMetaSize = 0x100000000000ULL;
-// TSAN_COMPAT_SHADOW is intended for COMPAT virtual memory layout,
-// when memory addresses are of the 0x2axxxxxxxxxx form.
-// The option is enabled with 'setarch x86_64 -L'.
-# if defined(TSAN_COMPAT_SHADOW) && TSAN_COMPAT_SHADOW
-static const uptr kLinuxAppMemBeg = 0x290000000000ULL;
-static const uptr kLinuxAppMemEnd = 0x7fffffffffffULL;
-static const uptr kAppMemGapBeg = 0x2c0000000000ULL;
-static const uptr kAppMemGapEnd = 0x7d0000000000ULL;
-# else
static const uptr kLinuxAppMemBeg = 0x7cf000000000ULL;
static const uptr kLinuxAppMemEnd = 0x7fffffffffffULL;
-# endif
#endif
static const uptr kLinuxAppMemMsk = 0x7c0000000000ULL;
@@ -128,10 +104,7 @@ static const uptr kLinuxShadowEnd =
MemToShadow(kLinuxAppMemEnd) | 0xff;
static inline bool IsAppMem(uptr mem) {
-#if defined(TSAN_COMPAT_SHADOW) && TSAN_COMPAT_SHADOW
- return (mem >= kLinuxAppMemBeg && mem < kAppMemGapBeg) ||
- (mem >= kAppMemGapEnd && mem <= kLinuxAppMemEnd);
-#elif defined(TSAN_GO)
+#if defined(TSAN_GO)
return mem <= kLinuxAppMemEnd;
#else
return mem >= kLinuxAppMemBeg && mem <= kLinuxAppMemEnd;
@@ -151,17 +124,6 @@ static inline uptr ShadowToMem(uptr shadow) {
#endif
}
-// For COMPAT mapping returns an alternative address
-// that mapped to the same shadow address.
-// COMPAT mapping is not quite one-to-one.
-static inline uptr AlternativeAddress(uptr addr) {
-#if defined(TSAN_COMPAT_SHADOW) && TSAN_COMPAT_SHADOW
- return (addr & ~kLinuxAppMemMsk) | 0x280000000000ULL;
-#else
- return 0;
-#endif
-}
-
void FlushShadowMemory();
void WriteMemoryProfile(char *buf, uptr buf_size, uptr nthread, uptr nlive);
uptr GetRSS();