Abstract
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 spend 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 such as 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.
- Altman, E.R., Arnold, M., Fink, S., Mitchell, N. Performance analysis of idle programs. OOPSLA. ACM (2010), 739--753. Google ScholarDigital Library
- Curtsinger, C., Berger, E.D. Stabilizer: Statistically sound performance evaluation. In ASPLOS (New York, NY, USA, 2013), ACM. Google ScholarDigital Library
- Curtsinger, C., Berger, E.D. Coz: Finding code that counts with causal profiling. In SOSP, (ACM, New York, NY, 2015), 184--197. Google ScholarDigital Library
- David, F., Thomas, G., Lawall, J., Muller, G. Continuously measuring critical section pressure with the free-lunch profiler. In OOPSLA, (ACM, New York, NY, 2014), 291--307. Google ScholarDigital Library
- Free Software Foundation. Debugging with GDB, 10th edn., The Free Software Foundation, Boston, MA.Google Scholar
- Garcia, S., Jeon, D., Louie, C.M., Taylor, M.B. Kremlin: rethinking and rebooting gprof for the multicore age. In PLDI, (ACM, New York, NY, 2011), 458--469. Google ScholarDigital Library
- Graham, S.L., Kessler, P.B., McKusick, M.K. Gprof: A call graph execution profiler. In SIGPLAN Symposium on Compiler Construction, (ACM, New York, NY, 1982), 120--126. Google ScholarDigital Library
- Intel. Intel VTune Amplifier, 2015.Google Scholar
- kernel.org. perf: Linux profiling with performance counters, 2014.Google Scholar
- Kulkarni, M., Pai, V.S., Schuff, D.L. Towards architecture independent metrics for multicore performance analysis. SIGMETRICS Performance Evaluation Review 38, 3 (2010), 10--14. Google ScholarDigital Library
- Levon, J., Elie, P. Oprofile: A system profiler for Linux, 2004. http://oprofile.sourceforge.net/.Google Scholar
- Little, J.D. OR FORUM: Little's Law as Viewed on Its 50th Anniversary. Operations Research 59, 3 (2011), 536--549. Google ScholarDigital Library
- Miller, B.P., Yang, C.-Q. IPS: An interactive and automatic performance measurement tool for parallel and distributed programs. In ICDCS, 1987, 482--489.Google Scholar
- Mytkowicz, T., Diwan, A., Hauswirth, M., Sweeney, P.F. Evaluating the accuracy of Java profilers. In PLDI (2010) ACM, 187--197. Google ScholarDigital Library
- Snelick, R., JáJá, J., Kacker, R., Lyon, G. Synthetic-perturbation techniques for screening shared memory programs. Software Practice & Experience 24, 8 (1994), 679--701. Google ScholarDigital Library
- von Praun, C., Bordawekar, R., Cascaval, C. Modeling optimistic concurrency using quantitative dependence analysis. In PPoPP (2008), ACM, 185--196. Google ScholarDigital Library
- Zhang, X., Navabi, A., Jagannathan, S. Alchemist: A transparent dependence distance profiling infrastructure. In CGO (2009), IEEE Computer Society, 47--58. Google ScholarDigital Library
Index Terms
- Coz: finding code that counts with causal profiling
Recommendations
Bug localization via searching crowd-contributed code
Internetware '14: Proceedings of the 6th Asia-Pacific Symposium on InternetwareBug localization, i.e., locating bugs in code snippets, is a frequent task in software development. Although static bug-finding tools are available to reduce manual effort in bug localization, these tools typically detect bugs with known project-...
Who’s debugging the debuggers? exposing debug information bugs in optimized binaries
ASPLOS '21: Proceedings of the 26th ACM International Conference on Architectural Support for Programming Languages and Operating SystemsDespite the advancements in software testing, bugs still plague deployed software and result in crashes in production. When debugging issues —sometimes caused by “heisenbugs”— there is the need to interpret core dumps and reproduce the issue offline on ...
Comments