Abstract
Phase selection is the process of customizing the applied set of compiler optimization phases for individual functions or programs to improve performance of generated code. Researchers have recently developed novel feature-vector based heuristic techniques to perform phase selection during online JIT compilation. While these heuristics improve program startup speed, steady-state performance was not seen to benefit over the default fixed single sequence baseline. Unfortunately, it is still not conclusively known whether this lack of steady-state performance gain is due to a failure of existing online phase selection heuristics, or because there is, indeed, little or no speedup to be gained by phase selection in online JIT environments. The goal of this work is to resolve this question, while examining the phase selection related behavior of optimizations, and assessing and improving the effectiveness of existing heuristic solutions.
We conduct experiments to find and understand the potency of the factors that can cause the phase selection problem in JIT compilers. Next, using long-running genetic algorithms we determine that program-wide and method-specific phase selection in the HotSpot JIT compiler can produce ideal steady-state performance gains of up to 15% (4.3% average) and 44% (6.2% average) respectively. We also find that existing state-of-the-art heuristic solutions are unable to realize these performance gains (in our experimental setup), discuss possible causes, and show that exploiting knowledge of optimization phase behavior can help improve such heuristic solutions. Our work develops a robust open-source production-quality framework using the HotSpot JVM to further explore this problem in the future.
- F. Agakov, E. Bonilla, J. Cavazos, B. Franke, G. Fursin, M. F. P. O'Boyle, J. Thomson, M. Toussaint, and C. K. I. Williams. Using machine learning to focus iterative optimization. In CGO '06: Proceedings of the Symposium on Code Generation and Optimization, pages 295--305, 2006. Google ScholarDigital Library
- L. Almagor, K. D. Cooper, A. Grosul, T. J. Harvey, S. W. Reeves, D. Subramanian, L. Torczon, and T. Waterman. Finding effective compilation sequences. In Proceedings of the 2004 Conference on Languages, Compilers, and Tools for Embedded Systems, pages 231--239, 2004. Google ScholarDigital Library
- . M. Bishop. Neural Networks for Pattern Recognition. Oxford University Press, Inc., New York, NY, USA, 1995. Google ScholarDigital Library
- S. M. Blackburn, R. Garner, C. Hoffmann, A. M. Khang, 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, B. Moss, A. Phansalkar, D. Stefanović, T. VanDrunen, D. von Dincklage, and B. Wiedermann. The DaCapo benchmarks: Java benchmarking development and analysis. In Proceedings of the 21st annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications, OOPSLA '06, pages 169--190, 2006. Google ScholarDigital Library
- . Cavazos and M. F. P. O'Boyle. Method-specific dynamic compilation using logistic regression. In Proceedings of the conference on Object-oriented programming systems, languages, and applications, pages 229--240, 2006. Google ScholarDigital Library
- . Chow and Y. Wu. Feedback-directed selection and characterization of compiler optimizatons. Proc. 2nd Workshop on Feedback Directed Optimization, 1999.Google Scholar
- K. D. Cooper, P. J. Schielke, and D. Subramanian. Optimizing for reduced code space using genetic algorithms. In Proceedings of the ACM SIGPLAN 1999 workshop on Languages, compilers, and tools for embedded systems, pages 1--9, 1999. Google ScholarDigital Library
- G. Fursin, Y. Kashnikov, A. Memon, Z. Chamski, O. Temam, M. Namolaru, E. Yom-Tov, B. Mendelson, A. Zaks, E. Courtois, F. Bodin, P. Barnard, E. Ashton, E. Bonilla, J. Thomson, C. Williams, and M. O'Boyle. Milepost gcc: Machine learning enabled self-tuning compiler. International Journal of Parallel Programming, 39: 296--327, 2011.Google ScholarCross Ref
- A. Georges, D. Buytaert, and L. Eeckhout. Statistically rigorous java performance evaluation. In Proceedings of the conference on Object-oriented programming systems and applications, OOPSLA '07, pages 57--76, 2007. Google ScholarDigital Library
- D. E. Goldberg. Genetic Algorithms in Search, Optimization and Machine Learning. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 1st edition, 1989. Google ScholarDigital Library
- M. Haneda, P. M. W. Knijnenburg, and H. A. G. Wijshoff. Optimizing general purpose compiler optimization. In Proceedings of the 2nd conference on Computing frontiers, CF '05, pages 180--188, New York, NY, USA, 2005. ACM. ISBN 1-59593-019-1. Google ScholarDigital Library
- K. Hoste and L. Eeckhout. Cole: compiler optimization level exploration. In Proceedings of the 6th annual IEEE/ACM international symposium on Code generation and optimization, CGO '08, pages 165--174, New York, NY, USA, 2008. Google ScholarDigital Library
- http://www.oracle.com/technetwork/java/javase/memorymanagement-whitepaper150215.pdf. Memory Management in the Java HotSpot Virtual Machine, April 2006.Google Scholar
- K. Ishizaki, M. Kawahito, T. Yasue, M. Takeuchi, T. Ogasawara, T. Suganuma, T. Onodera, H. Komatsu, and T. Nakatani. Design, implementation, and evaluation of optimizations in a just-in-time compiler. In Proceedings of the ACM 1999 conference on Java Grande, JAVA '99, pages 119--128, 1999. Google ScholarDigital Library
- K. Ishizaki, M. Takeuchi, K. Kawachiya, T. Suganuma, O. Gohda, T. Inagaki, A. Koseki, K. Ogata, M. Kawahito, T. Yasue, T. Ogasawara, T. Onodera, H. Komatsu, and T. Nakatani. Effectiveness of cross-platform optimizations for a java just-in-time compiler. In Proceedings of the 18th annual ACM SIGPLAN conference on Object-oriented programing, systems, languages, and applications, pages 187--204, 2003. Google ScholarDigital Library
- P. A. Kulkarni. JIT compilation policy for modern machines. In Proceedings of the ACM international conference on Object oriented programming systems languages and applications, pages 773--788, 2011. Google ScholarDigital Library
- P. A. Kulkarni, D. B. Whalley, and G. S. Tyson. Evaluating heuristic optimization phase order search algorithms. In CGO '07: Proceedings of the International Symposium on Code Generation and Optimization, pages 157--169, 2007. Google ScholarDigital Library
- P. A. Kulkarni, M. R. Jantz, and D. B. Whalley. Improving both the performance benefits and speed of optimization phase sequence searches. In Proceedings of the ACM SIGPLAN/SIGBED 2010 conference on Languages, compilers, and tools for embedded systems, LCTES '10, pages 95--104, 2010. ISBN 978-1-60558-953-4. Google ScholarDigital Library
- S. Kulkarni and J. Cavazos. Mitigating the compiler optimization phase-ordering problem using machine learning. In Proceedings of the ACM international conference on Object oriented programming systems languages and applications, OOPSLA '12, pages 147--162. ACM, 2012. Google ScholarDigital Library
- H. Lee, D. von Dincklage, A. Diwan, and J. E. B. Moss. Understanding the behavior of compiler optimizations. Software Practice & Experience, 36 (8): 835--844, July 2006. Google ScholarDigital Library
- M. Paleczny, C. Vick, and C. Click. The Java hotspottm server compiler. In Proceedings of the Symposium on Java™ Virtual Machine Research and Technology Symposium, pages 1--12, Berkeley, CA, USA, 2001. USENIX. Google ScholarDigital Library
- Z. Pan and R. Eigenmann. PEAK: a fast and effective performance tuning system via compiler optimization orchestration. ACM Trans. Program. Lang. Syst., 30: 17:1--17:43, May 2008. Google ScholarDigital Library
- R. Sanchez, J. Amaral, D. Szafron, M. Pirvu, and M. Stoodley. Using machines to learn method-specific compilation strategies. In Code Generation and Optimization, pages 257--266, April 2011. Google ScholarDigital Library
- PEC98. Specjvm98 benchmarks. http://www.spec.org/jvm98/, 1998.Google Scholar
- S. Triantafyllis, M. Vachharajani, N. Vachharajani, and D. I. August. Compiler optimization-space exploration. In Proceedings of the International Symposium on Code Generation and Optimization, pages 204--215. IEEE, 2003. Google ScholarDigital Library
Index Terms
- Performance potential of optimization phase selection during dynamic JIT compilation
Recommendations
Performance potential of optimization phase selection during dynamic JIT compilation
VEE '13: Proceedings of the 9th ACM SIGPLAN/SIGOPS international conference on Virtual execution environmentsPhase selection is the process of customizing the applied set of compiler optimization phases for individual functions or programs to improve performance of generated code. Researchers have recently developed novel feature-vector based heuristic ...
Making collection operations optimal with aggressive JIT compilation
SCALA 2017: Proceedings of the 8th ACM SIGPLAN International Symposium on ScalaFunctional collection combinators are a neat and widely accepted data processing abstraction. However, their generic nature results in high abstraction overheads -- Scala collections are known to be notoriously slow for typical tasks. We show that ...
Mitigating JIT compilation latency in virtual execution environments
VEE 2019: Proceedings of the 15th ACM SIGPLAN/SIGOPS International Conference on Virtual Execution EnvironmentsMany Virtual Execution Environments (VEEs) rely on Just-in-time (JIT) compilation technology for code generation at runtime, e.g. in Dynamic Binary Translation (DBT) systems or language Virtual Machines (VMs). While JIT compilation improves native ...
Comments