skip to main content
10.1145/1167473.1167492acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
Article

Method-specific dynamic compilation using logistic regression

Published:16 October 2006Publication History

ABSTRACT

Determining the best set of optimizations to apply to a program has been a long standing problem for compiler writers. To reduce the complexity of this task, existing approaches typically apply the same set of optimizations to all procedures within a program, without regard to their particular structure. This paper develops a new method-specific approach that automatically selects the best optimizations on a per method basis within a dynamic compiler. Our approach uses the machine learning technique of logistic regression to automatically derive a predictive model that determines which optimizations to apply based on the features of a method. This technique is implemented in the Jikes RVM Java JIT compiler. Using this approach we reduce the average total execution time of the SPECjvm98 benchmarks by 29%. When the same heuristic is applied to the DaCapo+ benchmark suite, we obtain an average 33% reduction over the default level O2 setting.

References

  1. F. Agakov, E. Bonilla, J. Cavazos, B. Franke, G. Fursin, M. F. P. O'Boyle, J. Thomson, M. Toussiant, and C. K. I. Williams. Using machine learning to focus iterative optimization. In Fourth Annual IEEE/ACM Interational Conference on Code Generation and Optimization, pages 295--305, New York City, NY, March 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. L. Almagor, K. Cooper, A. Grosul, T. Harvey, S. Reeves, D. Subramanian, L. Torczon, and T. Waterman. Finding effective compilation sequences. In Proceedings of the Conference on Languages, Compilers, and Tools for Embedded Systems (LCTES), pages 231--239, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. B. Alpern, C. R. Attanasio, J. J. Barton, M. G. Burke, P.Cheng, J.-D.Choi, A. Cocchi, S. J. 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. C. Shepherd, S. E. Smith, V. C. Sreedhar, H. Srinivasan, and J. Whaley. The Jalapeño virtual machine. IBM Systems Journal, 39(1):211--238, Feb. 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. C. Bishop. Neural Networks for Pattern Recognition. Oxford University Press, 2005. 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, New York, NY, USA, Oct. 2006. ACM Press Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. B. Calder, D. Grunwald, M. Jones, D. Lindsay, J. Martin, M. Mozer, and B. Zoren. Evidence-based static branch prediction using machine learning. ACM Transactions on Programming Languages and Systems, 19(1):188--222, January 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. J. Cavazos and J. E. B. Moss. Inducing heuristics to decide whether to schedule. In Proceedings of the ACM SIGPLAN '04 Conference on Programming Language Design and Implementation, pages 183--194, Washington, D.C., June 2004. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. K. D. Cooper, A. Grosul, T. Harvey, S. Reeves, D. Subramanian, L. Torczon, and T. Waterman. Acme: adaptive compilation made efficient. In Proceedings of the Conference on Languages, Compilers, and Tools for Embedded Systems (LCTES), 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. K. D. Cooper, A. Grosul, T. Harvey, S. Reeves, D. Subramanian, L. Torczon, and T. Waterman. Searching for compilation sequences. Tech. report, Rice University, 2005.Google ScholarGoogle Scholar
  10. B. Franke, M. O'Boyle, J. Thomson, and G. Fursin. Probabilistic source-level optimisation of embedded programs. In Proceedings of the Conference on Languages, Compilers, and Tools for Embedded Systems (LCTES), 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. A. Georges, D. Buytaert, L. Eeckhout, and K. D. Bosschere. Method-level phase behavior in java workloads. In OOPSLA '04: Proceedings of the 19th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, pages 270--287, New York, NY, USA, 2004. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. P. A. Kulkarni, D. B. Whalley, G. S. Tyson, and J. W. Davidson. Exhaustive optimization phase order space exploration. In Fourth Annual IEEE/ACM Interational Conference on Code Generation and Optimization, pages 306--318, New York City, NY, March 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. M. G. Lagoudakis and M. L. Littman. Algorithm selection using reinforcement learning. In Proceedings of the 17th International Conference on Machine Learning, pages 511--518, Stanford, CA, June 2000. Morgan Kaufmann. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. J. Lau, M. Arnold, M. Hind, and B. Calder. Online performance auditing: using hot optimizations without getting burned. In Proceedings of the ACM SIGPLAN '06 Conference on Programming Language Design and Implementation, pages 239--251, Washington, D.C., June 2006. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. A. Monsifrot and F. Bodin. A machine learning approach to automatic production of compiler heuristics. In Tenth International Conference on Artificial Intelligence: Methodology, Systems, Applications (AIMSA), pages 41--50, Varna, Bulgaria, September 2002. Springer Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. J. E. B. Moss, P. E. Utgoff, J. Cavazos, D. Precup, D. Stefanović, C. Brodley, and D. Scheeff. Learning to schedule straight-line code. In Proceedings of Neural Information Processing Systems 1997 (NIPS*97), Denver CO, Dec. 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Z. Pan and R. Eigenmann. Fast automatic procedure-level performance tuning. In IEEE PACT, Seattle, WA, September 2006. IEEE Computer Society. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. R. Pinkers, P. Knijnenburg, M. Haneda, and H. Wijshoff. Statistical selection of compiler options. In Proceedings of the IEEE International Symposium on Modeling, Analysis, and Simulation of Computer and Telecommunication Systems (MASCOTS), pages 494--501, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Standard Performance Evaluation Corporation (SPEC), Fairfax, VA. SPEC JVM98 Benchmarks, 1998.Google ScholarGoogle Scholar
  20. M. Stephenson, S. Amarasinghe, M. Martin, and U.-M. O'Reilly. Meta optimization: Improving compiler heuristics with machine learning. In Proceedings of the ACM SIGPLAN '03 Conference on Programming Language Design and Implementation, pages 77--90, San Diego, Ca, June 2003. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. M. Stephenson and S. P. Amarasinghe. Predicting unroll factors using supervised classification. In Third Annual IEEE /ACM Interational Conference on Code Generation and Optimization, pages 123--134, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. S. Triantafyllis, M. Vachharajani, N. Vachharajani, and D. August. Compiler optimization-space exploration. In First Annual IEEE/ACM Interational Conference on Code Generation and Optimization, pages 204--215, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. K. Yotov, X. Li, G. Ren, M. Cibulskis, G. DeJong, M. Garzaran, D. Padua, K. Pingali, P. Stodghill, and P. Wu. A comparison of empirical and model-driven optimization. In Proceedings of the ACM SIGPLAN '03 Conference on Programming Language Design and Implementation, pages 63--76, San Diego, Ca, June 2003. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. M. Zhao, B. R. Childers, and M. L. Soffa. A model-based framework: an approach for profit-driven optimization. In Third Annual IEEE/ACM Interational Conference on Code Generation and Optimization, pages 317--327, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Method-specific dynamic compilation using logistic regression

        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

        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!