[compiler-rt] 608ffc9 - tsan: account for mid app range in mem profile
Dmitry Vyukov via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 22 01:13:36 PDT 2021
Author: Dmitry Vyukov
Date: 2021-09-22T10:13:31+02:00
New Revision: 608ffc98c3b781a3da9b7222d145cade96fda14c
URL: https://github.com/llvm/llvm-project/commit/608ffc98c3b781a3da9b7222d145cade96fda14c
DIFF: https://github.com/llvm/llvm-project/commit/608ffc98c3b781a3da9b7222d145cade96fda14c.diff
LOG: tsan: account for mid app range in mem profile
We account low and high ranges, but forgot abount the mid range.
Account mid range as well.
Reviewed By: melver
Differential Revision: https://reviews.llvm.org/D110148
Added:
Modified:
compiler-rt/lib/tsan/rtl/tsan_platform_linux.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cpp b/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cpp
index 902b6376c0fa..087ee880b965 100644
--- a/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cpp
+++ b/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cpp
@@ -107,9 +107,9 @@ void FillProfileCallback(uptr p, uptr rss, bool file,
mem[MemShadow] += rss;
else if (p >= MetaShadowBeg() && p < MetaShadowEnd())
mem[MemMeta] += rss;
- else if (p >= LoAppMemBeg() && p < LoAppMemEnd())
- mem[file ? MemFile : MemMmap] += rss;
- else if (p >= HiAppMemBeg() && p < HiAppMemEnd())
+ else if ((p >= LoAppMemBeg() && p < LoAppMemEnd()) ||
+ (p >= MidAppMemBeg() && p < MidAppMemEnd()) ||
+ (p >= HiAppMemBeg() && p < HiAppMemEnd()))
mem[file ? MemFile : MemMmap] += rss;
else if (p >= HeapMemBeg() && p < HeapMemEnd())
mem[MemHeap] += rss;
More information about the llvm-commits
mailing list