skip to main content
10.1145/1735997.1736016acmconferencesArticle/Chapter ViewAbstractPublication PagesveeConference Proceedingsconference-collections
research-article

Novel online profiling for virtual machines

Published:17 March 2010Publication History

ABSTRACT

Application profiling is a popular technique to improve program performance based on its behavior. Offline profiling, although beneficial for several applications, fails in cases where prior program runs may not be feasible, or if changes in input cause the profile to not match the behavior of the actual program run. Managed languages, like Java and C\#, provide a unique opportunity to overcome the drawbacks of offline profiling by generating the profile information online during the current program run. Indeed, online profiling is extensively used in current VMs, especially during selective compilation to improve program startup performance, as well as during other feedback-directed optimizations.

In this paper we illustrate the drawbacks of the current reactive mechanism of online profiling during selective compilation. Current VM profiling mechanisms are slow -- thereby delaying associated transformations, and estimate future behavior based on the program's immediate past -- leading to potential misspeculation that limit the benefits of compilation. We show that these drawbacks produce an average performance loss of over 14.5% on our set of benchmark programs, over an ideal offline approach that accurately compiles the hot methods early. We then propose and evaluate the potential of a novel strategy to achieve similar performance benefits with an online profiling approach. Our new online profiling strategy uses early determination of loop iteration bounds to predict future method hotness. We explore and present promising results on the potential, feasibility, and other issues involved for the successful implementation of this approach.

References

  1. A. Adl-Tabatabai, R. L. Hudson, M. J. Serrano, and S. Subramoney, Prefetch injection based on hardware monitoring and object metadata, PLDI '04: Proceedings of the ACM SIGPLAN 2004 conference on Programming language design and implementation, pages 267--276, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. M. Arnold, S. Fink, D. Grove, M. Hind, and P. F. Sweeney, Adaptive optimization in the jalapeno jvm, In Proceedings of the 15th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, pages 47--65, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. M. Arnold, M. Hind, and B. G. Ryder, Online feedback-directed optimization of java SIGPLAN Notices, 37(11):111--129, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. 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
  5. Ana Azevedo, Alex Nicolau, and Joe Hummel, Java annotation-aware just-in-time (ajit) complilation system, In JAVA '99: Proceedings of the ACM 1999 conference on Java Grande, pages 142--151, New York, NY, USA, 1999. ACM. ISBN 1-58113-161-5. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. D. Bruening and E. Duesterwald, Exploring optimal compilation unit shapes for an embedded just-in-time compiler, In 3rd ACM Workshop on Feedback-Directed and Dynamic Optimization, pages 13--20, 2000.Google ScholarGoogle Scholar
  7. D. Buytaert, A. Georges, M. Hind, M. Arnold, L. Eeckhout, and K. De Bosschere, Using hpm-sampling to drive dynamic compilation, In Proceedings of the 22nd annual ACM SIGPLAN conference on Object oriented programming systems and applications}, pages 553--568, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. P. P. Chang, S. A. Mahlke, and W. W. Hwu, Using profile information to assist classic code optimizations, Software Practice and Experience, 21:1301--1321, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Michael Cierniak, Guei-Yuan Lueh, and James M. Stichnoth, Practicing judo: Java under dynamic optimizations, In PLDI '00: Proceedings of the ACM SIGPLAN 2000 conference on Programming language design and implementation, pages 13--26, New York, NY, USA, 2000. ACM. ISBN 1-58113-199-2. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. D. Detlefs and O. Agesen, The case for multiple compilers, In OOPSLA'99 Workshop on Peformance Portability, and Simplicity in Virtual Machine Design, pages 180--194, November 1999.Google ScholarGoogle Scholar
  11. E. Duesterwald, C. Cascaval, and S. Dwarkadas, Characterizing and predicting program behavior and its variability, In PACT '03: Proceedings of the 12th International Conference on Parallel Architectures and Compilation Techniques, page 220, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. A. Gal, M. Bebenita, and M. Franz, One method at a time is quite a waste of time, In Proceedings of the Second ECOOP Workshop on Implementation, Compilation, Optimization of Object-Oriented Languages, Programs and Systems, 2007.Google ScholarGoogle Scholar
  13. M. X. Goemans, Advanced algorithms, Technical Report MIT/LCS/RSS-27, 1994. URL: citeseer.ist.psu.edu/article/goemans94advanced.html. 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. N. Grcevski, A. Kielstra, K. Stoodley, M. Stoodley, and V. Sundaresan, Javatm just-in-time compiler and virtual machine improvements for server and middleware applications, In Proceedings of the conference on Virtual Machine Research And Technology Symposium, pages 12--12, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. G. J. Hansen, Adaptive systems for the dynamic run-time optimization of programs, PhD thesis, Carnegie-Mellon Univ., Pittsburgh, PA, 1974. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Tim Harris, Controlling run-time compilation, In IEEE Workshop on Programming Languages for Real-Time Industrial Applications, pages 75--84, December 1998.Google ScholarGoogle Scholar
  18. Kim Hazelwood and David Grove, Adaptive online context-sensitive inlining, In CGO '03: Proceedings of the international symposium on Code generation and optimization, pages 253--264, Washington, DC, USA, 2003. IEEE Computer Society. ISBN 0-7695-1913-X. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. U. Holzle and D. Ungar, Reconciling responsiveness with performance in pure object-oriented languages, ACM Transactions Programing Languages Systems, 18(4):355--400, 1996. ISSN 0164--0925. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. U. Holzle, C. Chambers, and D. Ungar, Debugging optimized code with dynamic deoptimization, In PLDI '92: Proceedings of the ACM SIGPLAN 1992 conference on Programming language design and implementation, pages 32--43, 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Joseph Hummel, Ana Azevedo, David Kolson, and Alexandru Nicolau, Annotating the java bytecodes in support of optimization, Concurrency: Practice and Experience, 9(11):1003--1016, November 1997.Google ScholarGoogle ScholarCross RefCross Ref
  22. W. W. Hwu, S. A. Mahlke, W. Y. Chen, P. P. Chang, N. J. W., 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, Journal of Supercomputing, 7(1--2):229--248, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. R. M. Karp, On-line algorithms versus off-line algorithms: How much is it worth to know the future?, In Proceedings of the IFIP World Computer Congress on Algorithms, Software, Architecture -- Information Processing, Vol. 1, pages 416--429, 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. D. E. Knuth, An empirical study of fortran programs, Software: Practice and Experience}, 1(2):105--133, 1971.Google ScholarGoogle Scholar
  25. T. Kotzmann, C. Wimmer, H. Mossenbock, T. Rodriguez, K. Russell, and D. Cox, Design of the java hotspot client compiler for java 6, ACM Transactions on Architecture and Code Optimization, 5(1):1--32, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. C. Krintz, Coupling on-line and off-line profile information to improve program performance, In CGO '03: Proceedings of the international symposium on Code generation and optimization, pages 69--78, Washington, DC, USA, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. C. Krintz and B. Calder, Using annotations to reduce dynamic optimization time, In Proceedings of the ACM SIGPLAN 2001 conference on Programming language design and implementation, pages 156--167, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. 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
  29. P. Kulkarni, M. Arnold, and M. Hind, Dynamic compilation: the benefits of early investing, In VEE '07: Proceedings of the 3rd international conference on Virtual execution environments, pages 94--104, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. M. Mock, C. Chambers, and S. J. Eggers, Calpa: a tool for automating selective dynamic compilation, In MICRO 33: Proceedings of the 33rd annual ACM/IEEE international symposium on Microarchitecture, pages 291--302, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Michael Paleczny, Christopher Vick, and Cliff Click, The java hotspottm server compiler, In JVM'01: Proceedings of the 2001 Symposium on JavaTM Virtual Machine Research and Technology Symposium, pages 1--12, Berkeley, CA, USA, 2001. USENIX Association. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Karl Pettis and Robert C. Hansen, Profile guided code positioning, SIGPLAN Notices, 25(6):16--27, 1990. ISSN 0362--1340. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Patrice Pominville, Feng Qian, Raja Vallee-Rai, Laurie J. Hendren, and Clark Verbrugge, A framework for optimizing java using attributes, In CC '01: Proceedings of the 10th International Conference on Compiler Construction, pages 334--354, London, UK, 2001. Springer-Verlag. ISBN 3--540--41861--X. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. SPEC98, Specjvm98 benchmarks. http://www.spec.org/jvm98/.Google ScholarGoogle Scholar
  35. Kaffe Developer Team, Kaffe java virtual machine. http://www.kaffe.org/, September 19 2007.Google ScholarGoogle Scholar
  36. R. Vallee-Rai, P. Co, E. Gagnon, L. Hendren, P. Lam, and V. Sundaresan, Soot -- a java bytecode optimization framework, In CASCON '99: Proceedings of the 1999 conference of the Centre for Advanced Studies on Collaborative research, page 13, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Novel online profiling for virtual machines

    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
    • Published in

      cover image ACM Conferences
      VEE '10: Proceedings of the 6th ACM SIGPLAN/SIGOPS international conference on Virtual execution environments
      March 2010
      176 pages
      ISBN:9781605589107
      DOI:10.1145/1735997
      • cover image ACM SIGPLAN Notices
        ACM SIGPLAN Notices  Volume 45, Issue 7
        VEE '10
        July 2010
        161 pages
        ISSN:0362-1340
        EISSN:1558-1160
        DOI:10.1145/1837854
        Issue’s Table of Contents

      Copyright © 2010 ACM

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 17 March 2010

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article

      Acceptance Rates

      Overall Acceptance Rate80of235submissions,34%

    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!