[compiler-rt] f978497 - [sanitizer] Don't collect unused info
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 24 20:20:42 PST 2022
Author: Vitaly Buka
Date: 2022-02-24T20:20:34-08:00
New Revision: f978497d67c832367af57da5541eedefcac6e7ac
URL: https://github.com/llvm/llvm-project/commit/f978497d67c832367af57da5541eedefcac6e7ac
DIFF: https://github.com/llvm/llvm-project/commit/f978497d67c832367af57da5541eedefcac6e7ac.diff
LOG: [sanitizer] Don't collect unused info
Added:
Modified:
compiler-rt/lib/sanitizer_common/sanitizer_stackdepot.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_stackdepot.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_stackdepot.cpp
index ac87fab3eaf1f..a746d4621936c 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_stackdepot.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_stackdepot.cpp
@@ -75,16 +75,18 @@ uptr StackDepotNode::allocated() {
}
static void CompressStackStore() {
- u64 start = MonotonicNanoTime();
+ u64 start = Verbosity() >= 1 ? MonotonicNanoTime() : 0;
uptr
diff = stackStore.Pack(static_cast<StackStore::Compression>(
Abs(common_flags()->compress_stack_depot)));
if (!
diff )
return;
- u64 finish = MonotonicNanoTime();
- uptr total_before = theDepot.GetStats().allocated +
diff ;
- VPrintf(1, "%s: StackDepot released %zu KiB out of %zu KiB in %llu ms\n",
- SanitizerToolName,
diff >> 10, total_before >> 10,
- (finish - start) / 1000000);
+ if (Verbosity() >= 1) {
+ u64 finish = MonotonicNanoTime();
+ uptr total_before = theDepot.GetStats().allocated +
diff ;
+ VPrintf(1, "%s: StackDepot released %zu KiB out of %zu KiB in %llu ms\n",
+ SanitizerToolName,
diff >> 10, total_before >> 10,
+ (finish - start) / 1000000);
+ }
}
namespace {
More information about the llvm-commits
mailing list