%0 Conference Paper %B Proceedings of the 25th Symposium on Operating Systems Principles %D 2015 %T Coz: Finding Code That Counts with Causal Profiling %A Curtsinger, Charlie %A Berger, Emery D. %C New York, NY, USA %I ACM %P 184–197 %R 10.1145/2815400.2815409 %S SOSP '15 %U http://doi.acm.org/10.1145/2815400.2815409 %X Improving performance is a central concern for software developers. To locate optimization opportunities, developers rely on software profilers. However, these profilers only report where programs spent their time: optimizing that code may have no impact on performance. Past profilers thus both waste developer time and make it difficult for them to uncover significant optimization opportunities. This paper introduces causal profiling. Unlike past profiling approaches, causal profiling indicates exactly where programmers should focus their optimization efforts, and quantifies their potential impact. Causal profiling works by running performance experiments during program execution. Each experiment calculates the impact of any potential optimization by virtually speeding up code: inserting pauses that slow down all other code running concurrently. The key insight is that this slowdown has the same relative effect as running that line faster, thus "virtually" speeding it up. We present Coz, a causal profiler, which we evaluate on a range of highly-tuned applications: Memcached, SQLite, and the PARSEC benchmark suite. Coz identifies previously unknown optimization opportunities that are both significant and targeted. Guided by Coz, we improve the performance of Memcached by 9%, SQLite by 25%, and accelerate six PARSEC applications by as much as 68%; in most cases, these optimizations involve modifying under 10 lines of code. %8 10/2015 %@ 978-1-4503-3834-9