[compiler-rt] r281553 - [tsan] fix tsan build by adding a dummy __sanitizer_print_memory_profile
Kostya Serebryany via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 14 15:35:56 PDT 2016
Author: kcc
Date: Wed Sep 14 17:35:56 2016
New Revision: 281553
URL: http://llvm.org/viewvc/llvm-project?rev=281553&view=rev
Log:
[tsan] fix tsan build by adding a dummy __sanitizer_print_memory_profile
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_libcdep.cc
compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_libcdep.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_libcdep.cc?rev=281553&r1=281552&r2=281553&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_libcdep.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_libcdep.cc Wed Sep 14 17:35:56 2016
@@ -127,7 +127,7 @@ void BackgroundThread(void *arg) {
}
}
if (allocator_release_to_os && ReleseCallback) ReleseCallback();
- if (heap_profile &&
+ if (heap_profile && /* weak */ &__sanitizer_print_memory_profile &&
current_rss_mb > rss_during_last_reported_profile * 1.1) {
Printf("\n\nHEAP PROFILE at RSS %zdMb\n", current_rss_mb);
__sanitizer_print_memory_profile(90);
Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc?rev=281553&r1=281552&r2=281553&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc Wed Sep 14 17:35:56 2016
@@ -42,6 +42,8 @@ extern "C" void __tsan_resume() {
__tsan_resumed = 1;
}
+extern "C" void __sanitizer_print_memory_profile(int percent) {} // Stub.
+
namespace __tsan {
#if !defined(SANITIZER_GO) && !SANITIZER_MAC
More information about the llvm-commits
mailing list