[PATCH] D56333: [sanitizer] Reduce stack depot size on Android.

Evgenii Stepanov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 4 14:58:48 PST 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL350443: [sanitizer] Reduce stack depot size on Android. (authored by eugenis, committed by ).
Herald added a subscriber: delcypher.

Changed prior to commit:
  https://reviews.llvm.org/D56333?vs=180325&id=180330#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56333/new/

https://reviews.llvm.org/D56333

Files:
  compiler-rt/trunk/lib/sanitizer_common/sanitizer_stackdepot.cc
  compiler-rt/trunk/lib/sanitizer_common/sanitizer_stackdepot.h


Index: compiler-rt/trunk/lib/sanitizer_common/sanitizer_stackdepot.h
===================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_stackdepot.h
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_stackdepot.h
@@ -32,7 +32,7 @@
   void inc_use_count_unsafe();
 };
 
-const int kStackDepotMaxUseCount = 1U << 20;
+const int kStackDepotMaxUseCount = 1U << (SANITIZER_ANDROID ? 16 : 20);
 
 StackDepotStats *StackDepotGetStats();
 u32 StackDepotPut(StackTrace stack);
Index: compiler-rt/trunk/lib/sanitizer_common/sanitizer_stackdepot.cc
===================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_stackdepot.cc
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_stackdepot.cc
@@ -26,7 +26,7 @@
   u32 tag;
   uptr stack[1];  // [size]
 
-  static const u32 kTabSizeLog = 20;
+  static const u32 kTabSizeLog = SANITIZER_ANDROID ? 16 : 20;
   // Lower kTabSizeLog bits are equal for all items in one bucket.
   // We use these bits to store the per-stack use counter.
   static const u32 kUseCountBits = kTabSizeLog;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56333.180330.patch
Type: text/x-patch
Size: 1135 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190104/e09027dc/attachment.bin>


More information about the llvm-commits mailing list