[compiler-rt] [scudo] increase frames per stack to 16 for stack depot (PR #82427)
    via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Feb 20 14:12:21 PST 2024
    
    
  
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-compiler-rt-sanitizer
Author: Florian Mayer (fmayer)
<details>
<summary>Changes</summary>
8 was very low and it is likely that in real workloads we have more than an average of 8 frames per stack given on Android we have 3 at the bottom: __start_main, __libc_init, main, and three at the top: malloc, scudo_malloc and Allocator::allocate. That leaves 2 frames for application code, which is clearly unreasonable.
---
Full diff: https://github.com/llvm/llvm-project/pull/82427.diff
1 Files Affected:
- (modified) compiler-rt/lib/scudo/standalone/combined.h (+1-1) 
``````````diff
diff --git a/compiler-rt/lib/scudo/standalone/combined.h b/compiler-rt/lib/scudo/standalone/combined.h
index 080ba42ad44497..24054ddac64337 100644
--- a/compiler-rt/lib/scudo/standalone/combined.h
+++ b/compiler-rt/lib/scudo/standalone/combined.h
@@ -1520,7 +1520,7 @@ class Allocator {
     constexpr u32 kStacksPerRingBufferEntry = 2;
     constexpr u32 kMaxU32Pow2 = ~(UINT32_MAX >> 1);
     static_assert(isPowerOfTwo(kMaxU32Pow2));
-    constexpr u32 kFramesPerStack = 8;
+    constexpr u32 kFramesPerStack = 16;
     static_assert(isPowerOfTwo(kFramesPerStack));
 
     // We need StackDepot to be aligned to 8-bytes so the ring we store after
``````````
</details>
https://github.com/llvm/llvm-project/pull/82427
    
    
More information about the llvm-commits
mailing list