Abstract

Calling context trees are one of the most fundamental data structures for representing the interprocedural control flow of a program, providing valuable information for program understanding and optimization. Nodes of a calling context tree associate performance metrics to whole distinct paths in the call graph starting from the root function. However, no explicit information is provided for detecting short hot sequences of activations, which may be a better optimization target in large modular programs where groups of related functions are reused in many different parts of the code. Furthermore, calling context trees can grow prohibitively large in some scenarios. Another classical approach, called edge profiling, collects performance metrics for caller-callee pairs in the call graph, allowing it to detect hot paths of fixed length one. We study a generalization of edge and context-sensitive profiles by introducing a novel data structure called k-calling context forest (k-CCF). Nodes in a k-CCF associate performance metrics to paths of length at most k that lead to each distinct routine of the program, providing edge profiles for k=1, full context-sensitive profiles for k equal to infinity, as well as any other intermediate point in the spectrum. We study the properties of the k-CCF both theoretically and experimentally on a large suite of prominent Linux applications, showing how to construct it efficiently and discussing its relationships with the calling context tree. Our experiments show that the k-CCF can provide effective space-accuracy tradeoffs for interprocedural contextual profiling, yielding useful clues to the hot spots of a program that may be hidden in a calling context tree and using less space for small values of k, which appear to be the most interesting in practice.
- G. Ammons and J. R. Larus. Improving data-flow analysis with path profiles. SIGPLAN Not., 39 (4): 568--582, 2004. Google Scholar
Digital Library
- G. Ammons, T. Ball, and J. R. Larus. Exploiting hardware performance counters with flow and context sensitive profiling. SIGPLAN Not., 32 (5): 85--96, 1997. ISSN 0362--1340. Google Scholar
Digital Library
- G. Ammons, J.-D. Choi, M. Gupta, and N. Swamy. Finding and removing performance bottlenecks in large systems. In ECOOP, volume 3086 of LNCS, pages 170--194, 2004.Google Scholar
- T. Apiwattanapong and M. J. Harrold. Selective path profiling. In Proc. ACM SIGPLAN-SIGSOFT workshop on Program analysis for software tools and engineering, pages 35--42. ACM, 2002. Google Scholar
Digital Library
- M. Arnold and B. Ryder. A framework for reducing the cost of instrumented code. In PLDI, pages 168--179. ACM, 2001. Google Scholar
Digital Library
- M. Arnold and P. Sweeney. Approximating the calling context tree via sampling. Technical Report RC 21789, IBM Research, 2000.Google Scholar
- T. Ball and J. R. Larus. Efficient path profiling. In MICRO 29: Proceedings of the 29th annual ACM/IEEE international symposium on Microarchitecture, pages 46--57, 1996. Google Scholar
Digital Library
- T. Ball, P. Mataga, and M. Sagiv. Edge profiling versus path profiling: the showdown. In POPL, pages 134--148. ACM, 1998. Google Scholar
Digital Library
- A. R. Bernat and B. P. Miller. Incremental call-path profiling. Technical report, University of Wisconsin, 2004.Google Scholar
- M. D. Bond and K. S. McKinley. Continuous path and edge profiling. In Proc. 38th annual IEEE/ACM International Symposium on Microarchitecture, pages 130--140. IEEE Computer Society, 2005. Google Scholar
Digital Library
- M. D. Bond and K. S. McKinley. Practical path profiling for dynamic optimizers. In CGO, pages 205--216. IEEE Computer Society, 2005. Google Scholar
Digital Library
- M. D. Bond and K. S. McKinley. Probabilistic calling context. SIGPLAN Not. (proceedings of the 2007 OOPSLA conference), 42 (10): 97--112, 2007. Google Scholar
Digital Library
- D. C. D'Elia, C. Demetrescu, and I. Finocchi. Mining hot calling contexts in small space. In M. W. Hall and D. A. Padua, editors, PLDI, pages 516--527. ACM, 2011. Google Scholar
Digital Library
- N. Froyd, J. Mellor-Crummey, and R. Fowler. Low-overhead call path profiling of unmodified, optimized code. In Proc. 19th Annual International Conf. on Supercomputing, pages 81--90. ACM, 2005. Google Scholar
Digital Library
- S. L. Graham, P. B. Kessler, and M. K. McKusick. gprof: a call graph execution profiler (with retrospective). In K. S. McKinley, editor, Best of PLDI, pages 49--57. ACM, 1982.Google Scholar
- R. J. Hall. Call path refinement profiles. IEEE Trans. Softw. Eng., 21 (6): 481--496, 1995. Google Scholar
Digital Library
- R. J. Hall and A. J. Goldberg. Call path profiling of monotonic program resources in UNIX. In Proc. Summer 1993 USENIX Technical Conference, pages 1--19. USENIX Association, 1993. Google Scholar
Digital Library
- M. Hirzel and T. Chilimbi. Bursty tracing: A framework for low-overhead temporal profiling. In Proc. 4th ACM Workshop on Feedback-Directed and Dynamic Optimization, 2001.Google Scholar
- R. Joshi, M. D. Bond, and C. Zilles. Targeted path profiling: Lower overhead path profiling for staged dynamic optimization systems. In CGO, pages 239--250, 2004. Google Scholar
Digital Library
- Z. Lai, S.-C. Cheung, and W. K. Chan. Inter-context control-flow and data-flow test adequacy criteria for nesc applications. In M. J. Harrold and G. C. Murphy, editors, SIGSOFT FSE, pages 94--104. ACM, 2008. ISBN 978--1--59593--995--1. Google Scholar
Digital Library
- J. R. Larus. Whole program paths. SIGPLAN Not., 34 (5): 259--269, 1999. Google Scholar
Digital Library
- D. Melski and T. W. Reps. Interprocedural path profiling. In S. Jahnichen, editor, phCC, volume 1575 of Lecture Notes in Computer Science, pages 47--62. Springer, 1999. ISBN 3--540--65717--7. Google Scholar
Digital Library
- C. Ponder and R. J. Fateman. Inaccuracies in program profilers. Softw., Pract. Exper., 18 (5): 459--467, 1988. Google Scholar
Digital Library
- S. P. Reiss and M. Renieris. Encoding program executions. In Proceedings of the 23rd International Conference on Software Engineering, ICSE '01, pages 221--230, 2001. Google Scholar
Digital Library
- T. W. Reps, T. Ball, M. Das, and J. R. Larus. The use of program profiling for software maintenance with applications to the year 2000 problem. In M. Jazayeri and H. Schauer, editors, ESEC / SIGSOFT FSE, volume 1301 of phLecture Notes in Computer Science, pages 432--449. Springer, 1997. ISBN 3--540--63531--9. Google Scholar
Digital Library
- S. Roy and Y. N. Srikant. Profiling k-iteration paths: A generalization of the ball-larus profiling algorithm. In CGO, pages 70--80, 2009. Google Scholar
Digital Library
- A. Sarimbekov, A. Sewe, W. Binder, P. Moret, and M. Mezini. Jp2: Call-site aware calling context profiling for the java virtual machine. Science of Computer Programming, 2012. ISSN 0167--6423. 10.1016/j.scico.2011.11.003.Google Scholar
- J. M. Spivey. Fast, accurate call graph profiling. Softw., Pract. Exper., 34 (3): 249--264, 2004. Google Scholar
Digital Library
- W. N. Sumner, Y. Zheng, D. Weeratunge, and X. Zhang. Precise calling context encoding. In J. Kramer, J. Bishop, P. T. Devanbu, and S. Uchitel, editors, ICSE, pages 525--534. ACM, 2010. ISBN 978--1--60558--719--6. Google Scholar
Digital Library
- K. Vaswani, A. V. Nori, and T. M. Chilimbi. Preferential path profiling: compactly numbering interesting paths. In POPL, pages 351--362. ACM, 2007. Google Scholar
Digital Library
- J. Weidendorfer, M. Kowarschik, and C. Trinitis. A tool suite for simulation based analysis of memory access behavior. In phInternational Conference on Computational Science, volume 3038 of LNCS, pages 440--447, 2004.Google Scholar
- J. Whaley. A portable sampling-based profiler for Java virtual machines. In Proceedings of the ACM 2000 Conference on Java Grande, pages 78--87. ACM Press, 2000. Google Scholar
Digital Library
- M. R. Woodward, D. Hedley, and M. A. Hennell. Experience with path analysis and testing of programs. IEEE Trans. Software Eng., 6 (3): 278--286, 1980. Google Scholar
Digital Library
- X. Zhang, S. Tallam, and R. Gupta. Dynamic slicing long running programs through execution fast forwarding. In M. Young and P. T. Devanbu, editors, SIGSOFT FSE, pages 81--91. ACM, 2006. ISBN 1--59593--468--5. Google Scholar
Digital Library
- X. Zhuang, M. J. Serrano, H. W. Cain, and J.-D. Choi. Accurate, efficient, and adaptive calling context profiling. In PLDI, pages 263--271, 2006. Google Scholar
Digital Library
Index Terms
k-Calling context profiling
Recommendations
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. ...
k-Calling context profiling
OOPSLA '12: Proceedings of the ACM international conference on Object oriented programming systems languages and applicationsCalling context trees are one of the most fundamental data structures for representing the interprocedural control flow of a program, providing valuable information for program understanding and optimization. Nodes of a calling context tree associate ...
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