skip to main content
article
Public Access

AOT vs. JIT: impact of profile data on code quality

Published:21 June 2017Publication History
Skip Abstract Section

Abstract

Just-in-time (JIT) compilation during program execution and ahead-of-time (AOT) compilation during software installation are alternate techniques used by managed language virtual machines (VM) to generate optimized native code while simultaneously achieving binary code portability and high execution performance. Profile data collected by JIT compilers at run-time can enable profile-guided optimizations (PGO) to customize the generated native code to different program inputs. AOT compilation removes the speed and energy overhead of online profile collection and dynamic compilation, but may not be able to achieve the quality and performance of customized native code. The goal of this work is to investigate and quantify the implications of the AOT compilation model on the quality of the generated native code for current VMs.

First, we quantify the quality of native code generated by the two compilation models for a state-of-the-art (HotSpot) Java VM. Second, we determine how the amount of profile data collected affects the quality of generated code. Third, we develop a mechanism to determine the accuracy or similarity for different profile data for a given program run, and investigate how the accuracy of profile data affects its ability to effectively guide PGOs. Finally, we categorize the profile data types in our VM and explore the contribution of each such category to performance.

References

  1. Dacapo batik benchmark fails. https://github.com/RedlineResearch/OLDOpenJDK8/issues/1.Google ScholarGoogle Scholar
  2. Dacapo eclipse benchmark fails. https://github.com/RedlineResearch/OLD-OpenJDK8/issues/2.Google ScholarGoogle Scholar
  3. M. Arnold and D. Grove. Collecting and exploiting high-accuracy call graph profiles in virtual machines. In Proceedings of the Symposium on Code Generation and Optimization, CGO ’05, pages 51–62, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. M. Arnold and D. Grove. Collecting and exploiting high-accuracy call graph profiles in virtual machines. In Proceedings of the Symposium on Code Generation and Optimization, pages 51–62, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. M. Arnold, S. Fink, D. Grove, M. Hind, and P. F. Sweeney. A survey of adaptive optimization in virtual machines. Proceedings of the IEEE, 92(2):449–466, February 2005.Google ScholarGoogle ScholarCross RefCross Ref
  6. M. Arnold, S. Fink, D. Grove, M. Hind, and P. F. Sweeney. Adaptive optimization in the Jalapeno JVM. SIGPLAN Notices, 46(4):65–83, May 2011. ISSN 0362-1340. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. S. Blackburn, D. Frampton, R. Garner, and J. Zigman. dacapo-9.12bach. http://dacapobench.org/RELEASE NOTES.txt, 12 2009.Google ScholarGoogle Scholar
  8. 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´c, 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. ACM, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. W. J. Bowman, S. Miller, V. St-Amour, and R. K. Dybvig. Profileguided meta-programming. In Proceedings of the Conference on Programming Language Design and Implementation, pages 403–412, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. P. P. Chang, S. A. Mahlke, and W. mei W. Hwu. Using profile information to assist classic code optimizations. Software Practice and Experience, 21:1301–1321, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. M. Cierniak, G.-Y. Lueh, and J. M. Stichnoth. Practicing judo: Java under dynamic optimizations. In Proceedings of the Conference on Programming Language Design and Implementation, pages 13–26, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. E. Duesterwald and V. Bala. Software profiling for hot path prediction: Less is more. SIGPLAN Notices, 35(11):202–211, Nov. 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. A. Georges, D. Buytaert, and L. Eeckhout. Statistically rigorous Java performance evaluation. In Proceedings of the conference on Objectoriented programming systems and applications, pages 57–76, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. S. L. Graham, P. B. Kessler, and M. K. Mckusick. Gprof: A call graph execution profiler. SIGPLAN Notices, 17(6):120–126, 1982. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. U. Hölzle and D. Ungar. Reconciling responsiveness with performance in pure object-oriented languages. ACM Trans. Program. Lang. Syst., 18(4):355–400, 1996. ISSN 0164-0925. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. A. Homescu, S. Neisius, P. Larsen, S. Brunthaler, and M. Franz. Profile-guided automated software diversity. In Proceedings of the 2013 IEEE/ACM International Symposium on Code Generation and Optimization (CGO), CGO ’13, pages 1–11, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. S. Hong, J.-C. Kim, J. W. Shin, S.-M. Moon, H.-S. Oh, J. Lee, and H.-K. Choi. Java client ahead-of-time compiler for embedded systems. In Proceedings of the Conference on Languages, Compilers, and Tools for Embedded Systems, LCTES ’07, pages 63–72, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. X. Huang, S. M. Blackburn, K. S. McKinley, J. E. B. Moss, Z. Wang, and P. Cheng. The garbage collection advantage: Improving program locality. In Proceedings of the Conference on Object-oriented Programming, Systems, Languages, and Applications, OOPSLA ’04, pages 69–80, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. W.-M. W. Hwu, S. A. Mahlke, W. Y. Chen, P. P. Chang, N. J. Warter, R. A. Bringmann, R. G. Ouellette, R. E. Hank, T. Kiyohara, G. E. Haab, J. G. Holm, and D. M. Lavery. The superblock: An effective technique for vliw and superscalar compilation. J. Supercomput., 7 (1-2):229–248, 1993. ISSN 0920-8542. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. M. R. Jantz, F. J. Robinson, P. A. Kulkarni, and K. A. Doshi. Crosslayer memory management for managed language applications. In Proceedings of the Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 488–504, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. D.-H. Jung, S.-M. Moon, and H.-S. Oh. Hybrid compilation and optimization for java-based digital tv platforms. ACM Trans. Embed. Comput. Syst., 13(2s):62:1–62:27, Jan. 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. C. Krintz, D. Grove, V. Sarkar, and B. Calder. Reducing the overhead of dynamic compilation. Software: Practice and Experience, 31(8): 717–738, December 2000.Google ScholarGoogle ScholarCross RefCross Ref
  23. P. A. Kulkarni. JIT Compilation policy for modern machines. In Proceedings of the Conference on Object Oriented Programming Systems Languages and Applications, pages 773–788, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. M. Mock, C. Chambers, and S. J. Eggers. Calpa: A tool for automating selective dynamic compilation. In Proceedings of the Symposium on Microarchitecture, pages 291–302, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. T. Moseley, A. Shye, V. J. Reddi, D. Grunwald, and R. Peri. Shadow profiling: Hiding instrumentation costs with parallelism. In Proceedings of the Symposium on Code Generation and Optimization, CGO ’07, pages 198–208, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. T. Mytkowicz, A. Diwan, M. Hauswirth, and P. F. Sweeney. Evaluating the accuracy of java profilers. In Proceedings of the Conference on Programming Language Design and Implementation, PLDI ’10, pages 187–197, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. H.-S. Oh, J. H. Yeo, and S.-M. Moon. Bytecode-to-c ahead-of-time compilation for android dalvik virtual machine. In Proceedings of the Design, Automation & Test in Europe Conference & Exhibition, pages 1048–1053, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. M. Paleczny, C. Vick, and C. Click. The Java HotSpot™server compiler. In Proceedings of the Symposium on Java Virtual Machine Research and Technology Symposium, pages 1–12, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. K. Pettis and R. C. Hansen. Profile guided code positioning. In Proceedings of the ACM SIGPLAN 1990 Conference on Programming Language Design and Implementation, PLDI ’90, pages 16–27, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. F. J. Robinson, M. R. Jantz, and P. A. Kulkarni. Code cache management in managed language vms to reduce memory consumption for embedded systems. In Proceedings of the Conference on Languages, Compilers, Tools, and Theory for Embedded Systems, pages 11–20, 2016. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. S. Rubin, R. Bod´ık, and T. Chilimbi. An efficient profile-analysis framework for data-layout optimizations. In Proceedings of the 29th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL ’02, pages 140–153. ACM, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. M. Serrano, R. Bordawekar, S. Midkiff, and M. Gupta. Quicksilver: A quasi-static compiler for java. In Proceedings of the Conference on Object-oriented Programming, Systems, Languages, and Applications, pages 66–82, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. SPEC2008. Specjvm2008 benchmarks. http://www.spec.org/jvm2008/, 2008.Google ScholarGoogle Scholar
  34. T. Suganuma, T. Yasue, M. Kawahito, H. Komatsu, and T. Nakatani. Design and evaluation of dynamic optimizations for a java just-intime compiler. ACM Transactions on Programming Languages and Systems, 27(4):732–785, July 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. C.-S. Wang, G. Perez, Y.-C. Chung, W.-C. Hsu, W.-K. Shih, and H.-R. Hsu. A method-based ahead-of-time compiler for android applications. In Proceedings of the Conference on Compilers, Architectures and Synthesis for Embedded Systems, pages 15–24, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. Y. Wu and J. R. Larus. Static branch frequency and program profile analysis. In Proceedings of the Symposium on Microarchitecture, pages 1–11, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. AOT vs. JIT: impact of profile data on code quality

        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 52, Issue 5
          LCTES '17
          May 2017
          120 pages
          ISSN:0362-1340
          EISSN:1558-1160
          DOI:10.1145/3140582
          Issue’s Table of Contents
          • cover image ACM Conferences
            LCTES 2017: Proceedings of the 18th ACM SIGPLAN/SIGBED Conference on Languages, Compilers, and Tools for Embedded Systems
            June 2017
            120 pages
            ISBN:9781450350303
            DOI:10.1145/3078633
            • General Chair:
            • Vijay Nagarajan,
            • Program Chair:
            • Zili Shao

          Copyright © 2017 ACM

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 21 June 2017

          Check for updates

          Qualifiers

          • 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!