Abstract
Prior work has found call path profiles to be useful for optimizers and programmer-productivity tools. Unfortunately, previous approaches for collecting path profiles are expensive: they need to either execute additional instructions (to track calls and returns) or they need to walk the stack. The state-of-the-art techniques for call path profiling slow down the program by 7% (for C programs) and 20% (for Java programs). This paper describes an innovative technique that collects minimal information from the running program and later (offline) infers the full call paths from this information.
The key insight behind our approach is that readily available information during program execution - the height of the call stack and the identity of the current executing function - are good indicators of calling context. We call this pair a context identifier. Because more than one call path may have the same context identifier, we show how to disambiguate context identifiers by changing the sizes of function activation records. This disambiguation has no overhead in terms of executed instructions.
We evaluate our approach on the SPEC CPU 2006 C++ and C benchmarks. We show that collecting context identifiers slows down programs by 0.17% (geometric mean). We can map these context identifiers to the correct unique call path 80% of the time for C++ programs and 95% of the time for C programs.
- Gerald Aigner and Urs H¨olzle. Eliminating virtual function calls in C++ programs. In ECOOP '96: Proceedings of the 10th European Conference on Object-Oriented Programming, pages 142--166, London, UK, 1996. Springer-Verlag. Google Scholar
Digital Library
- Glenn Ammons, Thomas Ball, and James R. Larus. Exploiting hardware performance counters with flow and context sensitive profiling. SIGPLAN Not., 32(5):85--96, 1997. Google Scholar
Digital Library
- M. Arnold and D. Grove. Collecting and exploiting highaccuracy call graph profiles in virtual machines. In Code Generation and Optimization, 2005. CGO 2005. International Symposium on, pages 51--62, March 2005. Google Scholar
Digital Library
- Matthew Arnold and David Grove. Collecting and exploiting high-accuracy call graph profiles in virtual machines. In CGO '05: Proceedings of the international symposium on Code generation and optimization, pages 51--62, Washington, DC, USA, 2005. IEEE Computer Society. Google Scholar
Digital Library
- Thomas Ball and James R. Larus. Optimally profiling and tracing programs. ACM Trans. Program. Lang. Syst., 16(4):1319--1360, 1994. Google Scholar
Digital Library
- Andrew R. Bernat and Barton P. Miller. Incremental call-path profiling: Research articles. Concurr. Comput. : Pract. Exper., 19(11):1533--1547, 2007. Google Scholar
Digital Library
- Michael D. Bond and Kathryn S. McKinley. Probabilistic Calling Context. SIGPLAN Not., 42(10):97--112, 2007. Google Scholar
Digital Library
- Apple Computer. Shark. http://developer.apple.com/performance.Google Scholar
- Jeffrey Dean, David Grove, and Craig Chambers. Optimization of object-oriented programs using static class hierarchy analysis. In ECOOP '95: Proceedings of the 9th European Conference on Object-Oriented Programming, pages 77--101, London, UK, 1995. Springer-Verlag. Google Scholar
Digital Library
- Saumya Debray and Robert Muth. Alias analysis of executable code. In In POPL, pages 12--24, 1998. Google Scholar
Digital Library
- Henry Hanping Feng, Oleg M. Kolesnikov, Prahlad Fogla, Wenke Lee, and Weibo Gong. Anomaly detection using call stack information. In SP'03: Proceedings of the 2003 IEEE Symposium on Security and Privacy, page 62, Washington, DC, USA, 2003. IEEE Computer Society. Google Scholar
Digital Library
- Nathan Froyd, John Mellor-Crummey, and Rob Fowler. Lowoverhead call path profiling of unmodified, optimized code. In Proceedings of the 19th annual international conference on Supercomputing, pages 81--90, Cambridge,Massachusetts, 2005. ACM. Google Scholar
Digital Library
- Susan L. Graham, Peter B. Kessler, and Marshall K. Mckusick. gprof: A call graph execution profiler. In Proceedings of the 1982 SIGPLAN symposium on Compiler construction, pages 120--126, Boston, Massachusetts, United States, 1982. ACM. Google Scholar
Digital Library
- Kim Hazelwood and David Grove. Adaptive online contextsensitive inlining. In Proceedings of the international symposium on Code generation and optimization: feedback-directed and runtime optimization, pages 253--264, San Francisco, California, 2003. IEEE Computer Society. Google Scholar
Digital Library
- Allen D. Malony, Sameer Shende, Robert Bell, Kai Li, Li Li, and Nick Trebon. Advances in the TAU performance system. Performance analysis and grid computing, pages 129--144, 2004. Google Scholar
Digital Library
- Todd Mytkowicz, Amer Diwan, Matthias Hauswirth, and Peter F. Sweeney. Producing wrong data without doing anything obviously wrong! In ASPLOS '09: Proceeding of the 14th international conference on Architectural support for programming languages and operating systems, pages 265--276, New York, NY, USA, 2009. ACM. Google Scholar
Digital Library
- George C. Necula, Scott McPeak, Shree Prakash Rahul, and Westley Weimer. CIL: Intermediate language and tools for analysis and transformation of C programs. In CC '02: Proceedings of the 11th International Conference on Compiler Construction, pages 213--228, London, UK, 2002. Springer-Verlag. Google Scholar
Digital Library
- Karl Pettis and Robert C. Hansen. Profile guided code positioning. SIGPLAN Not., 25(6):16--27, 1990. Google Scholar
Digital Library
- J. M. Spivey. Fast, accurate call graph profiling. Softw. Pract. Exper., 34(3):249--264, 2004. Google Scholar
Digital Library
- B. Sprunt. Pentium 4 performance-monitoring features. Micro, IEEE, 22(4):72--82, Jul/Aug 2002. Google Scholar
Digital Library
- Standard Performance Evaluation Corporation. SPEC CPU2006 Benchmarks. http://www.spec.org/cpu2006/.Google Scholar
- Toshio Suganuma, Toshiaki Yasue, Motohiro Kawahito, Hideaki Komatsu, and Toshio Nakatani. A dynamic optimization framework for a Java just-in-time compiler. SIGPLAN Not., 36(11):180--195, 2001. Google Scholar
Digital Library
- Kapil Vaswani, Aditya V. Nori, and Trishul M. Chilimbi. Preferential path profiling: compactly numbering interesting paths. In Proceedings of the 34th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pages 351--362, Nice, France, 2007. ACM. Google Scholar
Digital Library
- Mark Weiser. Program slicing. In ICSE '81: Proceedings of the 5th international conference on Software engineering, pages 439--449, Piscataway, NJ, USA, 1981. IEEE Press. Google Scholar
Digital Library
- Xiaotong Zhuang, Mauricio J. Serrano, Harold W. Cain, and Jong-Deok Choi. Accurate, efficient, and adaptive calling context profiling. SIGPLAN Not., 41(6):263--271, 2006. Google Scholar
Digital Library
Index Terms
Inferred call path profiling
Recommendations
Inferred call path profiling
OOPSLA '09: Proceedings of the 24th ACM SIGPLAN conference on Object oriented programming systems languages and applicationsPrior work has found call path profiles to be useful for optimizers and programmer-productivity tools. Unfortunately, previous approaches for collecting path profiles are expensive: they need to either execute additional instructions (to track calls and ...
Accurate, efficient, and adaptive calling context profiling
PLDI '06: Proceedings of the 27th ACM SIGPLAN Conference on Programming Language Design and ImplementationCalling context profiles are used in many inter-procedural code optimizations and in overall program understanding. Unfortunately, the collection of profile information is highly intrusive due to the high frequency of method calls in most applications. ...
Accurate, efficient, and adaptive calling context profiling
Proceedings of the 2006 PLDI ConferenceCalling context profiles are used in many inter-procedural code optimizations and in overall program understanding. Unfortunately, the collection of profile information is highly intrusive due to the high frequency of method calls in most applications. ...







Comments