Abstract
Identifying the hottest paths in the control flow graph of a routine can direct optimizations to portions of the code where most resources are consumed. This powerful methodology, called path profiling, was introduced by Ball and Larus in the mid 90's [4] and has received considerable attention in the last 15 years for its practical relevance. A shortcoming of the Ball-Larus technique was the inability to profile cyclic paths, making it difficult to mine execution patterns that span multiple loop iterations. Previous results, based on rather complex algorithms, have attempted to circumvent this limitation at the price of significant performance losses even for a small number of iterations. In this paper, we present a new approach to multi-iteration path profiling, based on data structures built on top of the original Ball-Larus numbering technique. Our approach allows the profiling of all executed paths obtained as a concatenation of up to k Ball-Larus acyclic paths, where k is a user-defined parameter. We provide examples showing that this method can reveal optimization opportunities that acyclic-path profiling would miss. An extensive experimental investigation on a large variety of Java benchmarks on the Jikes RVM shows that our approach can be even faster than Ball-Larus due to fewer operations on smaller hash tables, producing compact representations of cyclic paths even for large values of k.
- B. Alpern, C. R. Attanasio, J. Barton, M. G. Burke, P. Cheng, J. D. Choi, A. Cocchi, S. Fink, D. Grove, M. Hind, S. F. Hummel, D. Lieber, V. Litvinov, M. F. Mergen, T. Ngo, J. R. Russell, V. Sarkar, M. J. Serrano, J. Shepherd, S. E. Smith, V. Sreedhar, H. Srinivasan, and J. Whaley. The Jalapeño virtual machine. IBM Systems Journal, 39 (1): 211--238, 2000. ISSN 0018-8670. Google Scholar
Digital Library
- 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
- G. Ausiello, C. Demetrescu, I. Finocchi, and D. Firmani. k-calling context profiling. In Proc. ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA 2012, pages 867--878, New York, NY, USA, 2012. ACM. ISBN 978-1-4503-1561-6. Google Scholar
Digital Library
- 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
- S. M. Blackburn, R. Garner, C. Hoffman, A. M. Khan, K. S. McKinley, R. Bentzur, A. Diwan, D. Feinberg, D. Frampton, S. Z. Guyer, M. Hirzel, A. Hosking, M. Jump, H. Lee, J. E. B. Moss, A. Phansalkar, D. Stefanović, T. VanDrunen, D. von Dincklage, and B. Wiedermann. The DaCapo benchmarks: Java benchmarking development and analysis. In OOPSLA '06: Proceedings of the 21st annual ACM SIGPLAN conference on Object-Oriented Programing, Systems, Languages, and Applications, pages 169--190, New York, NY, USA, Oct. 2006. ACM Press. Google Scholar
Digital Library
- R. Bodík, R. Gupta, and M. L. Soffa. Interprocedural conditional branch elimination. In Proceedings of the ACM SIGPLAN 1997 conference on Programming language design and implementation, PLDI '97, pages 146--158, New York, NY, USA, 1997. ACM. ISBN 0-89791-907-6. Google Scholar
Digital Library
- R. Bodík, R. Gupta, and M. L. Soffa. Load-reuse analysis: design and evaluation. In Proceedings of the ACM SIGPLAN 1999 conference on Programming language design and implementation, PLDI '99, pages 64--76, New York, NY, USA, 1999. ACM. ISBN 1-58113-094-5. Google Scholar
Digital Library
- R. Bodík, R. Gupta, and V. Sarkar. Abcd: eliminating array bounds checks on demand. In Proceedings of the ACM SIGPLAN 2000 conference on Programming language design and implementation, PLDI '00, pages 321--333, New York, NY, USA, 2000. ACM. ISBN 1-58113-199-2. Google Scholar
Digital Library
- R. Bodík, R. Gupta, and M. L. Soffa. Complete removal of redundant expressions. SIGPLAN Not., 39 (4): 596--611, Apr. 2004. ISSN 0362-1340. Google Scholar
Digital Library
- 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
- J. Bull, L. Smith, M. Westhead, D. Henty, and R. Davey. A methodology for benchmarking Java Grande applications. In Proceedings of the ACM 1999 conference on Java Grande, pages 81--88. ACM, 1999. Google Scholar
Digital Library
- J. A. Fisher. Trace scheduling: A technique for global microcode compaction. IEEE Trans. Comput., 30 (7): 478--490, July 1981. ISSN 0018-9340. Google Scholar
Digital Library
- E. Fredkin. Trie memory. Communications of the ACM, 3 (9): 490--499, 1960. Google Scholar
Digital Library
- Jikes RVM Research Archive. PEP: continuous path and edge profiling. http://jikesrvm.org/Research+Archive.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
- B. Li, L. Wang, H. Leung, and F. Liu. Profiling all paths: A new profiling technique for both cyclic and acyclic paths. Journal of Systems and Software, 85 (7): 1558--1576, 2012. ISSN 0164-1212. Google Scholar
Digital Library
- perf: Linux profiling with performance counters. https://perf.wiki.kernel.org/.Google Scholar
- 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
- S. Tallam, X. Zhang, and R. Gupta. Extending path profiling across loop backedges and procedure boundaries. In Proceedings of the international symposium on Code generation and optimization: feedback-directed and runtime optimization, CGO '04, pages 251--264, Washington, DC, USA, 2004. IEEE Computer Society. ISBN 0-7695-2102-9. 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
- C. Young and M. D. Smith. Better global scheduling using path profiles. In Proceedings of the 31st annual ACM/IEEE international symposium on Microarchitecture, MICRO 31, pages 115--123, 1998. Google Scholar
Digital Library
- R. C. Young. Path-based compilation. PhD thesis, Division of Engineering and Applied Sciences, Harvard University, Cambridge, MA, 1998. 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
Ball-Larus path profiling across multiple loop iterations
Recommendations
Edge profiling versus path profiling: the showdown
POPL '98: Proceedings of the 25th ACM SIGPLAN-SIGACT symposium on Principles of programming languagesEdge profiles are the traditional control flow profile of choice for profile-directed compilation. They have been the basis of path-based optimizations that select "hot" paths, even though edge profiles contain strictly less information than path ...
Efficient path profiling
MICRO 29: Proceedings of the 29th annual ACM/IEEE international symposium on MicroarchitectureA path profile determines how many times each acyclic path in a routine executes. This type of profiling subsumes the more common basic block and edge profiling, which only approximate path frequencies. Path profiles have many potential uses in program ...
Ball-Larus path profiling across multiple loop iterations
OOPSLA '13: Proceedings of the 2013 ACM SIGPLAN international conference on Object oriented programming systems languages & applicationsIdentifying the hottest paths in the control flow graph of a routine can direct optimizations to portions of the code where most resources are consumed. This powerful methodology, called path profiling, was introduced by Ball and Larus in the mid 90's [...







Comments