Company
Date Published
Author
Indragie Karunaratne
Word count
1563
Language
English
Hacker News points
None

Summary

The development of a performant iOS profiler requires careful consideration of performance overhead, sampling frequency, thread suspension methods, and data collection techniques. A sampling profiler collects data by periodically capturing call stacks on each thread and interpolating function durations between samples. The choice of sampling frequency, thread suspension method, and data collection technique can significantly impact the profiler's performance and accuracy. By leveraging Apple's Darwin kernel APIs for managing threads and reducing code execution while a thread is suspended, the Sentry iOS profiler achieves low overhead and high-quality profiling data from real user devices in production.