bugsnag / bugsnag-cocoa

BugSnag error monitoring & exception reporter for iOS, macOS, tvOS and watchOS
https://docs.bugsnag.com/platforms/ios
MIT License
234 stars 128 forks source link

[Plat-12269] Prevent inlining of stack trace entries that are going to be pruned #1661

Closed kstenerud closed 2 months ago

kstenerud commented 2 months ago

Goal

We prune the top of the stack trace so that our stack trace gathering code doesn't show in customer traces. However, if the optimizer inlines any of the functions/methods along the path, it breaks the pruning.

Design

Force everything along the trace gathering path to NOT be optimized, so that they are never folded or inlined.

github-actions[bot] commented 2 months ago

Bugsnag.framework binary size increased by 136 bytes from 718,176 to 718,312

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.1%    +136  +0.1%    +136    __TEXT,__text
  +0.1%     +80  +0.1%     +80    Symbol Table
  +0.0%     +56  +0.0%     +56    String Table
  -0.1%      -4  -0.1%      -4    __TEXT,__unwind_info
  -0.8%    -132  -0.8%    -132    [__TEXT]
  [ = ]       0  -5.0%    -136    [__LINKEDIT]
  +0.0%    +136  [ = ]       0    TOTAL

Generated by :no_entry_sign: Danger