skip to main content
research-article

Ball-Larus path profiling across multiple loop iterations

Published:29 October 2013Publication History
Skip Abstract Section

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.

References

  1. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  2. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  3. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  4. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  5. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  6. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  7. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  8. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  9. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  10. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  11. M. D. Bond and K. S. McKinley. Practical path profiling for dynamic optimizers. In CGO, pages 205--216. IEEE Computer Society, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  13. J. A. Fisher. Trace scheduling: A technique for global microcode compaction. IEEE Trans. Comput., 30 (7): 478--490, July 1981. ISSN 0018-9340. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. E. Fredkin. Trie memory. Communications of the ACM, 3 (9): 490--499, 1960. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Jikes RVM Research Archive. PEP: continuous path and edge profiling. http://jikesrvm.org/Research+Archive.Google ScholarGoogle Scholar
  16. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  17. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  18. perf: Linux profiling with performance counters. https://perf.wiki.kernel.org/.Google ScholarGoogle Scholar
  19. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  20. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  21. K. Vaswani, A. V. Nori, and T. M. Chilimbi. Preferential path profiling: compactly numbering interesting paths. In POPL, pages 351--362. ACM, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  23. R. C. Young. Path-based compilation. PhD thesis, Division of Engineering and Applied Sciences, Harvard University, Cambridge, MA, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. 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 ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Ball-Larus path profiling across multiple loop iterations

          Recommendations

          Comments

          Login options

          Check if you have access through your login credentials or your institution to get full access on this article.

          Sign in

          Full Access

          • Published in

            cover image ACM SIGPLAN Notices
            ACM SIGPLAN Notices  Volume 48, Issue 10
            OOPSLA '13
            October 2013
            867 pages
            ISSN:0362-1340
            EISSN:1558-1160
            DOI:10.1145/2544173
            Issue’s Table of Contents
            • cover image ACM Conferences
              OOPSLA '13: Proceedings of the 2013 ACM SIGPLAN international conference on Object oriented programming systems languages & applications
              October 2013
              904 pages
              ISBN:9781450323741
              DOI:10.1145/2509136

            Copyright © 2013 ACM

            Publisher

            Association for Computing Machinery

            New York, NY, United States

            Publication History

            • Published: 29 October 2013

            Check for updates

            Qualifiers

            • research-article

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader
          About Cookies On This Site

          We use cookies to ensure that we give you the best experience on our website.

          Learn more

          Got it!