diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2015-06-18 16:57:37 +0000 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2015-06-18 16:57:37 +0000 |
| commit | 70dd0e2087f79385e7c0fef60a2f0fe2ac842e4b (patch) | |
| tree | 69ce7f9c77d258a2e4b177448b9b9efbfb7fce2d | |
| parent | c59f22c5567ad237b0478d26a95c4b48f8715f2f (diff) | |
| download | bcm5719-llvm-70dd0e2087f79385e7c0fef60a2f0fe2ac842e4b.tar.gz bcm5719-llvm-70dd0e2087f79385e7c0fef60a2f0fe2ac842e4b.zip | |
tsan: mark meta shadow as NOHUGEPAGE
Meta shadow is compressing and we don't flush it,
so it makes sense to mark it as NOHUGEPAGE to not over-allocate memory.
On one program it reduces memory consumption from 5GB to 2.5GB.
llvm-svn: 240028
| -rw-r--r-- | compiler-rt/lib/tsan/rtl/tsan_platform_linux.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cc b/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cc index 0359f5e261b..1309058210c 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cc +++ b/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cc @@ -224,6 +224,10 @@ void InitializeShadowMemory() { #endif NoHugePagesInRegion(MemToShadow(kMadviseRangeBeg), kMadviseRangeSize * kShadowMultiplier); + // Meta shadow is compressing and we don't flush it, + // so it makes sense to mark it as NOHUGEPAGE to not over-allocate memory. + // On one program it reduces memory consumption from 5GB to 2.5GB. + NoHugePagesInRegion(kMetaShadowBeg, kMetaShadowEnd - kMetaShadowBeg); if (common_flags()->use_madv_dontdump) DontDumpShadowMemory(kShadowBeg, kShadowEnd - kShadowBeg); DPrintf("memory shadow: %zx-%zx (%zuGB)\n", |

