From 1455b552b764ecf4b95c8307cceb4a0d7290629d Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 27 Sep 2021 13:30:32 +0200 Subject: [PATCH] tsan: de-hardcode MemCount const Use MemCount instead of hard-coded value 7. Reviewed By: melver Differential Revision: https://reviews.llvm.org/D110532 --- compiler-rt/lib/tsan/rtl/tsan_platform_linux.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cpp b/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cpp index bb5ced75e4b1..a8b5403d0b82 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cpp +++ b/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cpp @@ -122,7 +122,7 @@ void FillProfileCallback(uptr p, uptr rss, bool file, void WriteMemoryProfile(char *buf, uptr buf_size, u64 uptime_ns) { uptr mem[MemCount]; internal_memset(mem, 0, sizeof(mem)); - GetMemoryProfile(FillProfileCallback, mem, 7); + GetMemoryProfile(FillProfileCallback, mem, MemCount); auto meta = ctx->metamap.GetMemoryStats(); StackDepotStats *stacks = StackDepotGetStats(); uptr nthread, nlive;